Skip to content

Conversation

@Urgau
Copy link
Member

@Urgau Urgau commented Jan 9, 2026

Successful merges:

r? @ghost

Create a similar rollup

JamieCunliffe and others added 25 commits January 8, 2026 11:59
The calls to `def_path_str` were outside the decorate callback in
`node_span_lint` which caused an ICE when the warning was an allowed
warning due to the call to `def_path_str` being executed but the
warning not actually being emitted.
Signed-off-by: tison <[email protected]>
Co-Authored-By: Orson Peters <[email protected]>
Signed-off-by: tison <[email protected]>
- Just a call to get_position
- Tested with OVMF on QEMU

Signed-off-by: Ayush Singh <[email protected]>
When PR rust-lang#147572 switched WASI to use Unix-style filesystem APIs, the
open_to_and_set_permissions function for WASI was implemented to call
OpenOptions::new().open() without setting any access mode flags.

This causes std::fs::copy to fail with the error:
"must specify at least one of read, write, or append access"

The fix is to explicitly set .write(true), .create(true), and
.truncate(true) on the OpenOptions, matching the behavior of the
non-WASI Unix implementation but without the permission handling
that WASI doesn't support.

Minimal reproduction:
    fn main() {
        std::fs::write("/src.txt", b"test").unwrap();
        match std::fs::copy("/src.txt", "/dst.txt") {
            Ok(_) => println!("PASS: fs::copy works!"),
            Err(e) => println!("FAIL: {}", e),
        }
    }

    # Compile and run:
    rustc +nightly --target wasm32-wasip2 test.rs -o test.wasm
    wasmtime -S cli --dir . test.wasm

    # Before fix: FAIL: must specify at least one of read, write, or append access
    # After fix:  PASS: fs::copy works!

Note: The existing test library/std/src/fs/tests.rs::copy_file_ok
would have caught this regression if the std test suite ran on WASI
targets. Currently std tests don't compile for wasm32-wasip2 due to
Unix-specific test code in library/std/src/sys/fd/unix/tests.rs.

Fixes the regression introduced in nightly-2025-12-10.
Tested using OVMF on QEMU.

Signed-off-by: Ayush Singh <[email protected]>
…oss35

Implement partial_sort_unstable for slice

This refers to rust-lang#149046.
Fix ICE in inline always warning emission.

The calls to `def_path_str` were outside the decorate callback in `node_span_lint` which caused an ICE when the warning was an allowed warning due to the call to `def_path_str` being executed but the warning not actually being emitted.

r? @davidtwco
Fix for ICE: eii: fn / macro rules None in find_attr()

Closes rust-lang#149981

This used to ICE:
```rust
macro_rules! foo_impl {}
#[eii]
fn foo_impl() {}
```

`#[eii]` generates a macro (called `foo_impl`) and a default impl. So the partial expansion used to roughly look like the following:

```rust
macro_rules! foo_impl {} // actually resolves here

extern "Rust" {
    fn foo_impl();
}

#[eii_extern_target(foo_impl)]
macro foo_impl {
    () => {};
}

const _: () = {
    #[implements_eii(foo_impl)] // assumed to name resolve to the macro v2 above
    fn foo_impl() {}
};
```

Now, shadowing rules for macrov2 and macrov1 are super weird! Take a look at this: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=23f21421921360478b0ec0276711ad36

So instead of resolving to the macrov2, we resolve the macrov1 named the same thing.

A regression test was added to this, and some span_delayed_bugs were added to make sure we catch this in the right places. But that didn't fix the root cause.

To make sure this simply cannot happen again, I made it so that we don't even need to do a name resolution for the default. In other words, the new partial expansion looks more like:

```rust
macro_rules! foo_impl {}

extern "Rust" {
    fn foo_impl(); // resolves to here now!!!
}

#[eii_extern_target(foo_impl)]
macro foo_impl {
    () => {};
}

const _: () = {
    #[implements_eii(known_extern_target=foo_impl)] // still name resolved, but directly to the foreign function.
    fn foo_impl() {}
};
```

The reason this helps is that name resolution for non-macros is much more predictable. It's not possible to have two functions like that with the same name in scope.

We used to key externally implementable items off of the defid of the macro, but now the unique identifier is the foreign function's defid which seems much more sane.

Finally, I lied a tiny bit because the above partial expansion doesn't actually work.
```rust
extern "Rust" {
    fn foo_impl(); // not to here
}

const _: () = {
    #[implements_eii(known_extern_target=foo_impl)] // actually resolves to this function itself
    fn foo_impl() {} // <--- so to here
};
```

So the last few commits change the expansion to actually be this:

```rust
macro_rules! foo_impl {}

extern "Rust" {
    fn foo_impl(); // resolves to here now!!!
}

#[eii_extern_target(foo_impl)]
macro foo_impl {
    () => {};
}

const _: () = {
    mod dflt { // necessary, otherwise `super` doesn't work
        use super::*;
        #[implements_eii(known_extern_target=super::foo_impl)] // now resolves to outside the `dflt` module, so the foreign item.
        fn foo_impl() {}
    }
};
```

I apologize to whoever needs to review this, this is very subtle and I hope this makes it clear enough 😭.
std: sys: fs: uefi: Implement File::read

Tested using OVMF on QEMU.

@rustbot label +O-UEFI
std: sys: fs: uefi: Implement File::tell

- Just a call to get_position
- Tested with OVMF on QEMU

@rustbot label +O-UEFI
Fix std::fs::copy on WASI by setting proper OpenOptions flags

When PR rust-lang#147572 switched WASI to use Unix-style filesystem APIs, the open_to_and_set_permissions function for WASI was implemented to call OpenOptions::new().open() without setting any access mode flags.

This causes std::fs::copy to fail with the error:
"must specify at least one of read, write, or append access"

The fix is to explicitly set .write(true), .create(true), and .truncate(true) on the OpenOptions, matching the behavior of the non-WASI Unix implementation but without the permission handling that WASI doesn't support.

Minimal reproduction:
```rs
    fn main() {
        std::fs::write("/src.txt", b"test").unwrap();
        match std::fs::copy("/src.txt", "/dst.txt") {
            Ok(_) => println!("PASS: fs::copy works!"),
            Err(e) => println!("FAIL: {}", e),
        }
    }
```
    # Compile and run:
    rustc +nightly --target wasm32-wasip2 test.rs -o test.wasm
    wasmtime -S cli --dir . test.wasm

    # Before fix: FAIL: must specify at least one of read, write, or append access
    # After fix:  PASS: fs::copy works!

Note: The existing test library/std/src/fs/tests.rs::copy_file_ok would have caught this regression if the std test suite ran on WASI targets. Currently std tests don't compile for wasm32-wasip2 due to Unix-specific test code in library/std/src/sys/fd/unix/tests.rs.

Fixes the regression introduced in nightly-2025-12-10.

r? @alexcrichton
Fix a trivial typo in def_id.rs

s/then/than/
…, r=tgross35

Don't check `[mentions]` paths in submodules from tidy

As we were reminded in [#triagebot > Mentions glob matching](https://rust-lang.zulipchat.com/#narrow/channel/224082-triagebot/topic/Mentions.20glob.20matching/with/567093226), triagebot cannot see changes in submodules.

So let's reflect that in the `tidy` check to avoid accidentally adding paths inside submodules.

I tested it with these entries:

```toml
[mentions."src/tools/cargo"]
cc = ["@ehuss"]
[mentions."src/tools/cargo/"]
cc = ["@ehuss"]
[mentions."src/tools/cargo/*"]
cc = ["@ehuss"]
[mentions."src/tools/cargo/README.md"]
cc = ["@ehuss"]
```

and got (as expected):

```
tidy [triagebot]: triagebot.toml [mentions.*] 'src/tools/cargo/README.md' cannot match inside a submodule
tidy [triagebot]: triagebot.toml [mentions.*] contains 'src/tools/cargo/*' which doesn't match any file or directory in the repository
```
cg_llvm: add a pause to make comment less confusing
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Jan 9, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 9, 2026
@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 9, 2026
@Urgau
Copy link
Member Author

Urgau commented Jan 9, 2026

@bors r+ rollup=never p=5

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 9, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 9, 2026

📌 Commit 2b8d078 has been approved by Urgau

It is now in the queue for this repository.

@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot added the merged-by-bors This PR was explicitly merged by bors. label Jan 10, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 10, 2026

☀️ Test successful - CI
Approved by: Urgau
Pushing 2b82e05 to main...

@rust-bors rust-bors bot merged commit 2b82e05 into rust-lang:main Jan 10, 2026
12 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Jan 10, 2026
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#149318 Implement partial_sort_unstable for slice 74b2aee3f1ea5737efe8b7b1abf7ee9e4dcee3de (link)
#150805 Fix ICE in inline always warning emission. e1588be5a7f994c1aa196dbce6623f38e62b1933 (link)
#150822 Fix for ICE: eii: fn / macro rules None in find_attr() f14adaf411fe170296c8c6abe881ce27a4cf3716 (link)
#150853 std: sys: fs: uefi: Implement File::read 7a617a3766379092acc4ab291bca5582a1bc57b8 (link)
#150855 std: sys: fs: uefi: Implement File::tell ba8aa5f5d1444c8e4b89d4699641a8796254c779 (link)
#150881 Fix std::fs::copy on WASI by setting proper OpenOptions fla… d710fc21f7a54cbb289b4d94b76187a44b4ecdb5 (link)
#150891 Fix a trivial typo in def_id.rs 5c24d782a5e3d90c6e3586daf31521e214279f95 (link)
#150892 Don't check [mentions] paths in submodules from tidy 3d2adfb302fcd0a17e228e72d982c1426bdf1d17 (link)
#150894 cg_llvm: add a pause to make comment less confusing 8cdbe9717d9a006e431be5fe9696bb02e9933ada (link)

previous master: 1191620b8c

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@github-actions
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 1191620 (parent) -> 2b82e05 (this PR)

Test differences

Show 238 test diffs

Stage 1

  • sort::partial::basic_impl: [missing] -> pass (J0)
  • sort::partial::random_patterns: [missing] -> pass (J0)
  • [ui] tests/ui/eii/duplicate/eii_conflict_with_macro.rs: [missing] -> pass (J2)

Stage 2

  • sort::partial::basic_impl: [missing] -> pass (J1)
  • sort::partial::random_patterns: [missing] -> pass (J1)
  • [ui] tests/ui/eii/duplicate/eii_conflict_with_macro.rs: [missing] -> pass (J3)

Additionally, 232 doctest diffs were found. These are ignored, as they are noisy.

Job group index

  • J0: pr-check-2, x86_64-gnu-llvm-20-3, x86_64-gnu-llvm-21-3
  • J1: aarch64-apple, aarch64-gnu, aarch64-gnu-llvm-20-1, aarch64-msvc-1, arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, test-various, x86_64-gnu, x86_64-gnu-aux, x86_64-gnu-llvm-20-2, x86_64-gnu-llvm-21-2, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1
  • J2: x86_64-gnu-llvm-20-3, x86_64-gnu-llvm-21-3
  • J3: aarch64-apple, aarch64-gnu, aarch64-gnu-llvm-20-1, aarch64-msvc-1, arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, test-various, x86_64-gnu, x86_64-gnu-debug, x86_64-gnu-gcc, x86_64-gnu-llvm-20, x86_64-gnu-llvm-20-2, x86_64-gnu-llvm-21-2, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1
Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 2b82e05da4acaa446a0bec73a27fe351dd9d4ad6 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-aux: 7185.7s -> 12838.1s (+78.7%)
  2. aarch64-apple: 8395.8s -> 11818.5s (+40.8%)
  3. dist-x86_64-apple: 6303.2s -> 8460.6s (+34.2%)
  4. pr-check-1: 1664.0s -> 2033.6s (+22.2%)
  5. i686-gnu-1: 6998.6s -> 8395.4s (+20.0%)
  6. dist-aarch64-llvm-mingw: 5615.1s -> 6458.9s (+15.0%)
  7. i686-gnu-2: 5362.8s -> 6146.6s (+14.6%)
  8. x86_64-gnu-miri: 4384.9s -> 5020.5s (+14.5%)
  9. i686-gnu-nopt-1: 7269.6s -> 8273.7s (+13.8%)
  10. x86_64-gnu: 7467.6s -> 8495.8s (+13.8%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2b82e05): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary -2.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) - - 0

Cycles

Results (secondary -0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.4% [-2.4%, -2.4%] 1
All ❌✅ (primary) - - 0

Binary size

Results (secondary 0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.1% [0.0%, 0.1%] 8
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Bootstrap: 472.536s -> 474.298s (0.37%)
Artifact size: 391.23 MiB -> 391.29 MiB (0.02%)

Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 10, 2026
Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 11, 2026
alloctests: Don't run the longer partial-sort tests under Miri

These tests take hours to run in Miri, which greatly increases the duration of the `x86_64-gnu-aux` job, as observed in rust-lang#150900 (comment).

- [Zulip thread in #t-infra](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/x86_64-gnu-aux.20job.20went.20from.20~2.20to.20~3.2E5.20hours/near/567354541)
rust-timer added a commit that referenced this pull request Jan 11, 2026
Rollup merge of #150947 - partial-sort-miri, r=tgross35

alloctests: Don't run the longer partial-sort tests under Miri

These tests take hours to run in Miri, which greatly increases the duration of the `x86_64-gnu-aux` job, as observed in #150900 (comment).

- [Zulip thread in #t-infra](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/x86_64-gnu-aux.20job.20went.20from.20~2.20to.20~3.2E5.20hours/near/567354541)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants