Commit graph

648 commits

Author SHA1 Message Date
cyrgani
c194e9ef56 do not add I-prioritize when F-* labels are present 2025-12-15 20:55:33 +00:00
Makai
24302fd95f triagebot: add myself(makai410) to the review rotation 2025-12-12 10:42:39 +08:00
Makai
de0d961eb3 triagebot: ping makai410 for rustc_public 2025-12-12 10:42:39 +08:00
bors
d5525a7300 Auto merge of #149798 - matthiaskrgr:rollup-wjgs9x6, r=matthiaskrgr
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#147585 (Suppress the error for private fields with non_exhaustive attribute)
 - rust-lang/rust#149215 (Emit `check-cfg` lints during attribute parsing rather than evaluation)
 - rust-lang/rust#149652 (Add release notes for 1.92.0)
 - rust-lang/rust#149720 (rustdoc book: mention inner doc attribute)
 - rust-lang/rust#149730 (lint: emit proper diagnostic for unsafe binders in improper_ctypes instead of ICE)
 - rust-lang/rust#149754 (Retire `opt_str2` from compiletest cli parsing)
 - rust-lang/rust#149755 (bootstrap: Use a `CompiletestMode` enum instead of bare strings)
 - rust-lang/rust#149763 (Add inline attribute to generated delegation function if needed)
 - rust-lang/rust#149772 (test: Add a test for 146133)
 - rust-lang/rust#149779 (Fix typo "an" → "and")
 - rust-lang/rust#149782 (Remove `[no-mentions]` handler in the triagebot config)

Failed merges:

 - rust-lang/rust#148491 ( Correctly provide suggestions when encountering `async fn` with a `dyn Trait` return type)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-09 08:20:51 +00:00
Urgau
b8581ddecc
Remove [no-mentions] handler in the triagebot config
https://github.blog/changelog/2025-11-07-removing-notifications-for-mentions-in-commit-messages/
2025-12-08 19:34:19 +01:00
Alex Crichton
ba462864f1 std: Use more unix.rs code on WASI targets
This commit is a large change to the implementation of filesystem and
other system-related operations on WASI targets. Previously the standard
library explicitly used the `wasi` crate at the 0.11.x version track
which means that it used WASIp1 APIs directly. This meant that `std` was
hard-coded to use WASIp1 syscalls and there was no separate
implementation for the WASIp{2,3} targets, for example. The high-level
goal of this commit is to decouple this interaction and avoid the use of
the `wasi` crate on the WASIp2 target.

Historically when WASIp1 was originally added to Rust the wasi-libc
library was in a much different position than it is today. Nowadays Rust
already depends on wasi-libc on WASI targets for things like memory
allocation and environment variable management. As a libc library it
also has all the functions necessary to implement all filesystem
operations Rust wants. Recently wasi-libc additionally was updated to
use WASIp2 APIs directly on the `wasm32-wasip2` target instead of using
`wasm32-wasip1` APIs. This commit is leveraging this work by enabling
Rust to completely sever the dependence on WASIp1 APIs when compiling
for `wasm32-wasip2`. This is also intended to make it easier to migrate
to `wasm32-wasip3` internally in the future where now only libc need be
updated and Rust doesn't need to explicitly change as well.

The overall premise of this commit is that there's no need for
WASI-specific implementation modules throughout the standard library.
Instead the libc-style bindings already implemented for Unix-like
targets are sufficient. This means that Rust will now be using
libc-style interfaces to interact with the filesystem, for example, and
wasi-libc is the one responsible for translating these POSIX-ish
functions into WASIp{1,2} calls.

Concrete changes here are:

* `std` for `wasm32-wasip2` no longer depends on `wasi 0.11.x`
* The implementation of `std::os::wasi::fs`, which was previously
  unstable and still is, now has portions gated to only work on the
  WASIp1 target which use the `wasi` crate directly. Traits have been
  trimmed down in some cases, updated in others, or now present a
  different API on WASIp1 and WASIp2. It's expected this'll get further
  cleanup in the future.
* The `std::sys::fd::wasi` module is deleted and `unix` is used instead.
* The `std::sys::fs::wasi` module is deleted and `unix` is used instead.
* The `std::sys::io::io_slice::wasi` module is deleted and `unix` is used
  instead.
* The `std::sys::pal::{wasip1,wasip2}` modules are now merged together
  as their difference is much smaller than before.
* The `std::sys::pal::wasi::time` is deleted and the `unix` variant is
  used directly instead.
* The `std::sys::stdio::wasip{1,2}` modules are deleted and the `unix`
  variant is used instead.
* The `std::sys:🧵:wasip{1,2}` modules are deleted and the `unix`
  variant is used instead.

Overall Rust's libstd is effectively more tightly bound to libc when
compiled to WASI targets. This is intended to mirror how it's expected
all other languages will also bind to WASI. This additionally has the
nice goal of drastically reducing the WASI-specific maintenance burden
in libstd (in theory) and the only real changes required here are extra
definitions being added to `libc` (done in separate PRs). This might be
required for more symbols in the future but for now everything should be
mostly complete.
2025-12-08 06:46:28 -08:00
Stuart Cook
e168509186
Rollup merge of #149526 - mati865:mati865-review-rotation, r=Kivooeo
Add myself (mati865) to the review rotation

I've been procrastinating long enough.
2025-12-02 13:56:33 +11:00
Mateusz Mikuła
5c282908be
Add myself (mati865) to the review rotation
I've been procrastinating long enough.
2025-12-01 22:46:13 +01:00
Jacob Hoffman-Andrews
70a0af3f4e Remove jsha from notifications for rustdoc HTML 2025-11-16 16:11:15 -08:00
Waffle Lapkin
abaccaed21
waffle: stop watching codegen ssa 2025-11-13 14:36:17 +01:00
Jakub Beránek
bc0126d451
Change default branch to main 2025-11-10 10:21:34 +01:00
yukang
479df91c0c Add myself(chenyukang) to the review rotation 2025-11-09 20:46:03 +08:00
Trevor Gross
f7f0ca4b76 triagebot: Create Zulip topics for libs backports
Take the configuration used by other teams to create Zulip topics for
T-libs backports.
2025-11-04 15:41:08 -06:00
apiraino
d5839f968c
Enable regression labeling aliases 2025-10-30 16:52:31 +01:00
apiraino
c49278f77a
Update T-compiler/ops Zulip messages
Slightly reword the issue prioritization and beta backport Zulip messages
2025-10-28 17:24:26 +01:00
Jonathan Brouwer
9ceb997e04
Add myself to the review rotation 2025-10-23 17:52:54 +02:00
Jieyou Xu
860a3d4466
triagebot: remind to update rustc-dev-guide docs when modifying compiletest directives 2025-10-19 19:03:21 +08:00
Matthias Krüger
a71cd41155
Rollup merge of #147527 - apiraino:update-beta-nom-zulip-msg, r=Kobzol
Update t-compiler beta nomination Zulip msg

Sister patch of [triagebot#2191](https://github.com/rust-lang/triagebot/pull/2191)
Follow-up to rust-lang/rust#147263

The triagebot now triggers a different message when a PR is nominated for backport, making it look like more a suggestion to evaluate for the author/reviewers than a mandatory decision for the team to take.

The wording (as per [triagebot#2191](https://github.com/rust-lang/triagebot/pull/2191)) is open to suggestions.

Thanks
2025-10-15 23:41:02 +02:00
apiraino
de67ea37a7
Update t-compiler beta nomination Zulip msg 2025-10-15 12:47:03 +02:00
Mads Marquart
efd7c8dd61 Add myself (madsmtm) to review rotation 2025-10-15 00:13:29 +02:00
Jieyou Xu
16cfde9703
triagebot: disable auto stable-regression compiler backport nominations
No prejudice against re-enabling them if the nominations include a bit
more context on _why_ it's automatically nominated and _which_
regression(s) are being addressed. Or as proposed, it could also simply
become a reminder-to-nominate _comment_.
2025-10-02 17:21:40 +08:00
joboet
9c97ba700e
add joboet to library review rotation 2025-09-29 11:20:40 +02:00
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