626 Commits

Author SHA1 Message Date
Ralf Jung
c63e034906 triagebot: warn about #[rustc_intrinsic_const_stable_indirect]; make warnings a bit more noticeable 2025-09-09 08:34:15 +02:00
Matthias Krüger
4b9b0265a0
Rollup merge of #146200 - GuillaumeGomez:simplify-rustdoc-gui-tests, r=lolbinarycat
Simplify rustdoc-gui tester by calling directly browser-ui-test

The output and handling of `browser-ui-test` is now mostly the same as we did manually, so no need to keep our wrapper anymore. Lot of code removed! \o/

r? `@lolbinarycat`
2025-09-06 23:49:53 +02:00
bors
1ed3cd7030 Auto merge of #146233 - jieyouxu:run-make-fission, r=Kobzol
Split `run-make` into two {`run-make`,`run-make-cargo`} test suites

## Summary

Split `tests/run-make` into two test suites, to make it faster and more convenient for contributors to run run-make tests that do not need in-tree `cargo`.

| New test suites        | Explanation                                                                                                                                                                                                                              |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tests/run-make`       | The "fast path" test suite intended for run-make tests that do not need in-tree `cargo`. These tests may not use `cargo`.                                                                                                                |
| `tests/run-make-cargo` | The "slow path" test suite that requires checking out `cargo` submodule and building in-tree `cargo`, and thus will have access to in-tree `cargo`. In practice, these constitute a very small portion of the original `run-make` tests. |

This PR carries out [MCP 847: Split run-make test suite into slower-building test suite with suitably-staged cargo and faster-building test suite without cargo](https://github.com/rust-lang/compiler-team/issues/847).
Fixes rust-lang/rust#135573 (for the tests that do not need in-tree `cargo`).
Fixes rust-lang/rust#134109.

## Remarks

- I considered if we want to split by in-tree tools previously. However, as discussed rust-lang/rust#134109, in practice `rustdoc` is not very slow to build, but `cargo` takes a good few minutes. So, the partition boundary was determined to be along in-tree `cargo` availability.
- The `run-make` tests previously that wanted to use `cargo` cannot just use the bootstrap `cargo`, otherwise they would run into situations where bootstrap `cargo` can significantly diverge from in-tree `cargo` (see https://github.com/rust-lang/rust/pull/130642).

---

try-job: aarch64-msvc-1
try-job: test-various
try-job: x86_64-gnu-debug
try-job: aarch64-gnu-debug
try-job: aarch64-apple
try-job: dist-various-1
2025-09-06 18:37:35 +00:00
Guillaume Gomez
b0a8e3c767 Simplify rustdoc-gui tester by calling directly browser-ui-test 2025-09-06 20:34:26 +02:00
León Orell Valerian Liehr
349fbba24f
Rollup merge of #138944 - madsmtm:apple_os_version_check, r=tgross35
Add `__isPlatformVersionAtLeast` and `__isOSVersionAtLeast` symbols

## Motivation

When Objective-C code uses ```@available(...)`,`` Clang inserts a call to [`__isPlatformVersionAtLeast`](https://github.com/llvm/llvm-project/blob/llvmorg-20.1.0/compiler-rt/lib/builtins/os_version_check.c#L276) (`__isOSVersionAtLeast` in older Clang versions). These symbols not being available sometimes ends up causing linker errors. See the new test `tests/run-make/apple-c-available-links` for a minimal reproducer.

The workaround is to link `libclang_rt.osx.a`, see e.g. https://github.com/alexcrichton/curl-rust/issues/279. But that's very difficult for users to figure out (and the backreferences to that issue indicates that people are still running into this in their own projects every so often).

For another recent example, this is preventing `rustc` from using LLVM assertions on macOS, see https://github.com/rust-lang/rust/pull/62592#issuecomment-510670657 and https://github.com/rust-lang/rust/pull/134275#issuecomment-2543067830.

It is also a blocker for [setting the correct minimum OS version in `cc-rs`](https://github.com/rust-lang/rust/issues/136113), since fixing this in `cc-rs` might end up introducing linker errors in places where we weren't before (by default, if using e.g. ```@available(macos`` 10.15, *)`, the symbol usually happens to be left out, since `clang` defaults to compiling for the host macOS version, and thus things _seem_ to work - but the availability check actually compiles down to nothing, which is a huge correctness footgun for running on older OSes).

(My super secret evil agenda is also to expose some variant of ```@available``` in Rust's `std` after https://github.com/rust-lang/rfcs/pull/3750 progresses further, will probably file an ACP for this later. But I believe this PR has value regardless of those future plans, since we'd be making C/Objective-C/Swift interop easier).

## Solution

Implement `__isPlatformVersionAtLeast` and `__isOSVersionAtLeast` as part of the "public ABI" that `std` exposes.

**This is insta-stable**, in the same sense that additions to `compiler-builtins` are insta-stable, though the availability of these symbols can probably be considered a "quality of implementation" detail rather than a stable promise.

I originally proposed to implement this in `compiler-builtins`, see https://github.com/rust-lang/compiler-builtins/pull/794, but we discussed moving it to `std` instead ([Zulip thread](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Provide.20.60__isPlatformVersionAtLeast.60.20in.20.60std.60.3F/with/507880717)), which makes the implementation substantially simpler, and we avoid gnarly issues with requiring the user to link `libSystem.dylib` (since `std` unconditionally does that).

Note that this does not solve the linker errors for (pure) `#![no_std]` users, but that's _probably_ fine, if you are using ```@available``` to test the OS version on Apple platforms, you're likely also using `std` (and it is still possible to work around by linking `libclang_rt.*.a`).

A thing to note about the implementation, I've choosen to stray a bit from LLVM's upstream implementation, and not use `_availability_version_check` since [it has problems when compiling with an older SDK](https://github.com/llvm/llvm-project/issues/64227). Instead, we use `sysctl kern.osproductversion` when available to still avoid the costly PList lookup in most cases, but still with a fall back to the PList lookup when that is not available (with the PList fallback being is similar to LLVM's implementation).

## Testing

Apple has a lot of different "modes" that they can run binaries in, which can be a bit difficult to find your bearings in, but I've tried to be as thorough as I could in testing them all.

Tested using roughly the equivalent of `./x test library/std -- platform_version` on the following configurations:
- macOS 14.7.3 on a Macbook Pro M2
    - `aarch64-apple-darwin`
    - `x86_64-apple-darwin` (under Rosetta)
    - `aarch64-apple-ios-macabi`
    - `x86_64-apple-ios-macabi` (under Rosetta)
    - `aarch64-apple-ios` (using Xcode's "Designed for iPad" setting)
    - `aarch64-apple-ios-sim` (in iOS Simulator, as iPhone with iOS 17.5)
    - `aarch64-apple-ios-sim` (in iOS Simulator, as iPad with iOS 18.2)
    - `aarch64-apple-tvos-sim` (in tvOS Simulator)
    - `aarch64-apple-watchos-sim` (in watchOS Simulator)
    - `aarch64-apple-ios-sim` (in visionOS simulator, using Xcode's "Designed for iPad" setting)
    - `aarch64-apple-visionos-sim` (in visionOS Simulator)
- macOS 15.3.1 VM
    - `aarch64-apple-darwin`
    - `aarch64-apple-ios-macabi`
- macOS 10.12.6 on an Intel Macbook from 2013
    - `x86_64-apple-darwin`
    - `i686-apple-darwin`
    - `x86_64-apple-ios` (in iOS Simulator)
- iOS 9.3.6 on a 1st generation iPad Mini
    - `armv7-apple-ios` with an older compiler

Along with manually inspecting the output of `version_from_sysctl()` and `version_from_plist()`, and verifying that they actually match what's expected.

I believe the only real omissions here would be:
- `aarch64-apple-ios` on a newer iPhone that has `sysctl` available (iOS 11.4 or above).
- `aarch64-apple-ios` on a Vision Pro using Xcode's "Designed for iPad" setting.

But I don't have the hardware available to test those.

``@rustbot`` label O-apple A-linkage -T-compiler -A-meta -A-run-make

try-job: aarch64-apple
2025-09-05 22:47:17 +02:00
Mads Marquart
846d6a4466 Add __isOSVersionAtLeast and __isPlatformVersionAtLeast symbols
Allows users to link to Objective-C code using `@available(...)`.
2025-09-05 16:18:49 +02:00
Jieyou Xu
8665305f2b
triagebot: account for new tests/run-make-cargo test suite 2025-09-05 21:39:51 +08:00
Ralf Jung
9c6c5df2c4 triagebot: fix rustc_allow_const_fn_unstable matcher 2025-09-04 12:29:52 +02:00
Ralf Jung
fea27a665c triagebot: configure some pings when certain attributes are used 2025-09-03 21:33:31 +02:00
Alex Crichton
5d81f033a5 std: Start supporting WASIp2 natively
This commit is the start of an effort to support WASIp2 natively in the
standard library. Before this commit the `wasm32-wasip2` target behaved
exactly like `wasm32-wasip1` target by importing APIs from the core wasm
module `wasi_snapshot_preview1`. These APIs are satisfied by the
`wasm-component-ld` target by using an [adapter] which implements WASIp1
in terms of WASIp2. This adapter comes at a cost, however, in terms of
runtime indirection and instantiation cost, so ideally the adapter would
be removed entirely. The purpose of this adapter was to provide a
smoother on-ramp from WASIp1 to WASIp2 when it was originally created.

The `wasm32-wasip2` target has been around for long enough now that it's
much more established. Additionally the only thing historically blocking
using WASIp2 directly was implementation effort. Work is now underway to
migrate wasi-libc itself to using WASIp2 directly and now seems as good
a time as any to migrate the Rust standard library too.

Implementation-wise the milestones here are:

* The `wasm32-wasip2` target now also depends on the `wasi` crate at
  version 0.14.* in addition to the preexisting dependency of 0.11.*.
  The 0.14.* release series binds WASIp2 APIs instead of WASIp1 APIs.
* Some preexisting naming around `mod wasi` or `wasi.rs` was renamed to
  `wasip1` where appropriate. For example `std::sys::pal::wasi` is now
  called `std::sys::pal::wasip1`.
* More platform-specific WASI modules are now split between WASIp1 and
  WASIp2. For example getting the current time, randomness, and
  process arguments now use WASIp2 APIs directly instead of using WASIp1
  APIs that require an adapter.

It's worth pointing out that this PR does not migrate the entire
standard library away from using WASIp1 APIs on the `wasm32-wasip2`
target. Everything related to file descriptors and filesystem APIs is
still using WASIp1. Migrating that is left for a future PR. In the
meantime the goal of this change is to lay the groundwork necessary for
migrating in the future. Eventually the goal is to drop the `wasi`
0.11.* dependency on the `wasm32-wasip2` target (the `wasm32-wasip1`
target will continue to retain this dependency).

[adapter]: https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-preview1-component-adapter/README.md
2025-08-28 15:07:15 -07:00
Josh Triplett
42d6330509 triagebot: Update style team reviewers 2025-08-21 18:37:39 -07:00
Urgau
992c025c71 Enable triagebot [review-changes-since] feature 2025-08-20 19:15:46 +02:00
bors
f605b57042 Auto merge of #145601 - jieyouxu:rollup-t5mbqhc, r=jieyouxu
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#145538 (bufreader::Buffer::backshift: don't move the uninit bytes)
 - rust-lang/rust#145542 (triagebot: Don't warn no-mentions on subtree updates)
 - rust-lang/rust#145549 (Update rust maintainers in openharmony.md)
 - rust-lang/rust#145550 (Avoid using `()` in `derive(From)` output.)
 - rust-lang/rust#145556 (Allow stability attributes on extern crates)
 - rust-lang/rust#145560 (Remove unused `PartialOrd`/`Ord` from bootstrap)
 - rust-lang/rust#145568 (ignore frontmatters in `TokenStream::new`)
 - rust-lang/rust#145571 (remove myself from some adhoc-groups and pings)
 - rust-lang/rust#145576 (Add change tracker entry for `--timings`)
 - rust-lang/rust#145578 (Add VEXos "linked files" support to `armv7a-vex-v5`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-08-19 23:52:06 +00:00
许杰友 Jieyou Xu (Joe)
9d957a8677
Rollup merge of #145571 - davidtwco:davidtwco-remove-from-groups, r=lqd
remove myself from some adhoc-groups and pings

Removing myself from some adhoc-groups related to the MIR as its been quite a while since I've worked in that area
2025-08-19 19:50:06 +08:00
许杰友 Jieyou Xu (Joe)
c318e14e7b
Rollup merge of #145542 - blyxyas:no-mentions-subtree, r=Urgau
triagebot: Don't warn no-mentions on subtree updates

Complement to https://github.com/rust-lang/triagebot/pull/2137

r? ``@Urgau``
2025-08-19 19:50:02 +08:00
许杰友 Jieyou Xu (Joe)
32c20b91e9
Rollup merge of #145486 - Urgau:unicode-mention, r=lqd
Fix `unicode_data.rs` mention message

The [previous message](https://github.com/rust-lang/rust/pull/145479#issuecomment-3193088286) was weirdly formatted, let's render it properly.
2025-08-19 19:45:34 +08:00
Bastian Kersting
95bdb34494 Remove the no_sanitize attribute in favor of sanitize
This removes the #[no_sanitize] attribute, which was behind an unstable
feature named no_sanitize. Instead, we introduce the sanitize attribute
which is more powerful and allows to be extended in the future (instead
of just focusing on turning sanitizers off).

This also makes sanitize(kernel_address = ..) attribute work with
-Zsanitize=address

To do it the same as how clang disables address sanitizer, we now
disable ASAN on sanitize(kernel_address = "off") and KASAN on
sanitize(address = "off").

The same was added to clang in https://reviews.llvm.org/D44981.
2025-08-18 08:45:28 +00:00
David Wood
abcfa4390d
remove myself from some adhoc-groups and pings 2025-08-18 06:36:42 +00:00
blyxyas
479e31e2c1 Don't warn no-mentions on subtree updates 2025-08-18 00:40:08 +02:00
Urgau
e906a59ebb Fix unicode_data.rs mention message 2025-08-16 12:55:23 +02:00
Jacob Pratt
cf28e2b0d5
Rollup merge of #145466 - Urgau:triagebot-range-diff, r=Kobzol
Enable new `[range-diff]` feature in triagebot

This new feature adds a comment to triagebot range-diff feature when a PR is rebased  onto a different base/master commit.

Related to [#t-compiler > Experimental range-diff for force-push @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Experimental.20range-diff.20for.20force-push/near/534649322)

r? Kobzol
2025-08-15 18:13:33 -04:00
Urgau
cd37ed50fa Enable new [range-diff] feature in triagebot 2025-08-15 18:47:48 +02:00
Jakub Beránek
9bf76aba76
Rollup merge of #145448 - jieyouxu:rustfmt-labels, r=fmease
Autolabel `src/tools/{rustfmt,rust-analyzer}` changes with `T-{rustfmt,rust-analyzer}`

Make e.g. rust-lang/rust#144323 more obvious who should be reviewing it and easier to filter.
2025-08-15 16:04:02 +02:00
Jieyou Xu
26817eec05
Autolabel src/tools/{rustfmt,rust-analyzer} changes with T-{rustfmt,rust-analyzer} 2025-08-15 21:34:58 +08:00
Marcelo Domínguez
250d77e5d7 Complete functionality and general cleanup 2025-08-14 16:30:15 +00:00
Tim (Theemathas) Chirananthavat
f336cc777b
Make I-miscompile imply I-prioritize
Since I-unsound already implies I-prioritize, it makes sense that I-miscompile should do the same.
2025-08-12 08:26:11 +07:00
Stuart Cook
a4acb8aafa
Rollup merge of #145160 - xizheyin:behind-upstream, r=Urgau
Change days-threshold to 28 in [behind-upstream]

Make the days-threshold to 28 to reduce false positives.

[#triagebot > Outdated commit message](https://rust-lang.zulipchat.com/#narrow/channel/224082-triagebot/topic/Outdated.20commit.20message)

r? ``````@Urgau``````

cc ``````@jieyouxu``````
2025-08-10 19:45:54 +10:00
xizheyin
ca1e464ac3
Change days-threshold to 28 in [behind-upstream]
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-08-09 19:58:58 +08:00
jackh726
7ea5e79c31 Readd myself to review queue 2025-08-07 20:19:43 +00:00
Waffle Lapkin
df61951a19
autolabel PRs that change etc tests as F-explicit_tail_calls 2025-08-05 10:42:55 +02:00
bors
924a5a4b7f Auto merge of #144773 - RalfJung:rollup-uif2yyj, r=RalfJung
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#144397 (`tests/ui/issues/`: The Issues Strike Back [2/N])
 - rust-lang/rust#144410 (Make tier 3 musl targets link dynamically by default)
 - rust-lang/rust#144708 (Add tracing to step.rs and friends)
 - rust-lang/rust#144730 (Create a typed wrapper for codegen backends in bootstrap)
 - rust-lang/rust#144771 (Remove some noisy triagebot pings for myself)
 - rust-lang/rust#144772 (add unsupported_calling_conventions to lint list)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-08-01 10:20:07 +00:00
Ralf Jung
feac604509
Rollup merge of #144771 - jieyouxu:noisy-ping, r=jieyouxu
Remove some noisy triagebot pings for myself

r? ghost
2025-08-01 09:59:05 +02:00
Jieyou Xu
89b4bb66d8
Remove some noisy triagebot pings 2025-08-01 14:52:00 +08:00
Jacob Pratt
74d5b09fc2
Rollup merge of #144759 - tgross35:triagebot-label, r=lqd
triagebot: Label `compiler-builtins` T-libs

Changes to `compiler-builtins` don't currently get a `T-` label, but it is mostly managed by libs. Add the autolabel here.
2025-08-01 00:38:22 -04:00
Trevor Gross
5622816961 triagebot: Label compiler-builtins T-libs
Changes to `compiler-builtins` don't currently get a `T-` label, but it
is mostly managed by libs. Add the autolabel here.
2025-07-31 23:10:42 +00:00
Scott Schafer
1f787383d4
chore: Ping Muscraft when rustc_errors::emitter is modified 2025-07-31 16:06:06 -06:00
Scott Schafer
eae1d392e7
chore: Ping Muscraft when annnotate snippets emitter is modified 2025-07-31 16:06:06 -06:00
Jana Dönszelmann
e1d3ad89c7
remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
apiraino
c5b4606d2a
Enable t-compiler backport nomination 2025-07-28 18:52:57 +02:00
Matthias Krüger
d2d002ee89
Rollup merge of #144427 - lolbinarycat:tidy-extra_checks-rename, r=Kobzol
rename ext_tool_checks to extra_checks and use mod.rs

this makes the triagebot pings for this module simpler

discussed in https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/rename.20and.20reorganize.20ext_tool_checks.20module.3F/with/528398253

r? `@Kobzol`
2025-07-26 15:28:01 +02:00
binarycat
b96f238308 rename ext_tool_checks to extra_checks and use mod.rs
this makes the triagebot pings for this module simpler
2025-07-25 11:41:53 -05:00
Boxy
97676e609f Allow setting release-blog-post label with rustbot 2025-07-25 00:02:39 +01:00
Matthias Krüger
4177f199bc
Rollup merge of #144173 - Kivooeo:tidy_checks, r=jieyouxu
Remove tidy checks for `tests/ui/issues/`

r? ``````````@jieyouxu``````````

As it is making cleanup efforts more difficult.

This change was discussed here [#t-compiler > Discussion for ui test suite improvements @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Discussion.20for.20ui.20test.20suite.20improvements/near/529566433)
2025-07-23 15:59:28 +02:00
Guillaume Gomez
a27f3e3fd1 Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
Guillaume Gomez
ed93c1783b Rename tests/assembly into tests/assembly-llvm 2025-07-22 14:27:48 +02:00
Kivooeo
bcaa79529d removed tidy check on issues files 2025-07-21 14:52:30 +05:00
Jieyou Xu
491b873d83
Add myself to infra-ci reviewer group 2025-07-17 17:33:44 +08:00
Jieyou Xu
2ca2d93035
Auto-label src/ci and .github/workflows with A-CI
And include `.github/workflows` for `T-infra` trigger files.
2025-07-17 17:32:26 +08:00
Samuel Tardieu
f03a56f706
Rollup merge of #143630 - jieyouxu:drop-suggest, r=Mark-Simulacrum
Drop `./x suggest`

This PR removes the current `./x suggest` implementation (rust-lang/rust#109933, rust-lang/rust#106249) and associated docs for several reasons:

1. Primarily, `./x suggest` is another "flow" in bootstrap that incurs extra complexity and more invariants that bootstrap has to maintain. This causes more friction when trying to investigate and fix staging problems. As far as I know, this flow has not been actively maintained in quite a while, and I'm not aware of interest in maintaining it. Bootstrap really could use less implementation complexity with a very limited maintenance bandwidth.
2. The current `./x suggest` implementation "bypasses" the usual stage defaults for the various check/build/test/etc. flows, and it's not really possible to have a stage default because `./x suggest --run` produces a *sequence* of suggestions like [`./x check`, `./x test library/std`, ..] and then tries to run all of them in sequence, based on which files are modified.
3. We've not seen a lot of interest both in using it or extending static/dynamic test suggestions. Last extensions were rust-lang/rust#117961 and rust-lang/rust#120763. I'm not convinced the extra implementation complexity is worth it. This was discussed in:
    - [#t-infra/bootstrap > Dropping the current &#96;./x suggest&#96; flow implementation](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Dropping.20the.20current.20.60.2E.2Fx.20suggest.60.20flow.20implementation/with/527456699)
    - [#t-compiler > Dropping current &#96;./x suggest&#96; implementation](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Dropping.20current.20.60.2E.2Fx.20suggest.60.20implementation/with/527528696)

Closes rust-lang/rust#109933 (the current implementation is being removed).
Closes rust-lang/rust#143569 (by removing `./x suggest` altogether).
2025-07-15 12:52:37 +02:00
Jieyou Xu
0a899e0e8a
Update triagebot autolabel 2025-07-15 00:46:34 +08:00