Skip to content

perf experiment: give noalias back to refs in closures - #162361

Draft
RalfJung wants to merge 1 commit into
rust-lang:mainfrom
RalfJung:maybe-dangling-perf2
Draft

RalfJung wants to merge 1 commit into
rust-lang:mainfrom
RalfJung:maybe-dangling-perf2

Conversation

@RalfJung

@RalfJung RalfJung commented Sep 6, 2026

Copy link
Copy Markdown
Member

More #160745 perf experiments.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 6, 2026
@RalfJung

RalfJung commented Sep 6, 2026

Copy link
Copy Markdown
Member Author

@bors try
@rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 6, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 6, 2026
perf experiment: give noalias back to refs in closures
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-miri failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
tests/pass/shims/x86/rounding-error.rs ... ok
tests/pass/shims/x86/intrinsics-x86-gfni.rs ... ok

FAILED TEST: tests/pass/generators.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-IsU3Vt" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/generators.rs" "--edition" "2024" "--cfg=stack" "-Cextra-filename=stack"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/generators.stack.stderr` to the actual output
+++ <stderr output>
error: Undefined Behavior: trying to retag from <1438> for Unique permission at alloc623[0x0], but that tag does not exist in the borrow stack for this location
##[error]  --> tests/pass/generators.rs:83:17
   |
LL |     let mut j = i;
   |                 ^
   |                 |
   |                 this error occurs as part of retag at alloc623[0x0..0x1]
   |                 while retagging field .<coroutine-state(3)>.<captured-var(r)>
   |
   = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental
   = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
help: <1438> was created by a Unique retag at offsets [0x0..0x1]
  --> tests/pass/generators.rs:73:21
   |
LL |             let a = r;
   |                     ^
help: <1438> was later invalidated at offsets [0x0..0x1] by a Unique retag
  --> tests/pass/generators.rs:83:17
   |
LL |     let mut j = i;
   |                 ^
   = note: stack backtrace:
           0: movable_gen
               at tests/pass/generators.rs:83:17: 83:18
           1: main
---



full stderr:
error: Undefined Behavior: trying to retag from <1438> for Unique permission at alloc623[0x0], but that tag does not exist in the borrow stack for this location
##[error]  --> tests/pass/generators.rs:83:17
   |
LL |     let mut j = i;
   |                 ^
   |                 |
   |                 this error occurs as part of retag at alloc623[0x0..0x1]
   |                 while retagging field .<coroutine-state(3)>.<captured-var(r)>
   |
   = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental
   = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
help: <1438> was created by a Unique retag at offsets [0x0..0x1]
  --> tests/pass/generators.rs:73:21
   |
LL |             let a = r;
   |                     ^
help: <1438> was later invalidated at offsets [0x0..0x1] by a Unique retag
  --> tests/pass/generators.rs:83:17
   |
LL |     let mut j = i;
   |                 ^
   = note: stack backtrace:
           0: movable_gen
               at tests/pass/generators.rs:83:17: 83:18
           1: main
---



FAILED TEST: tests/pass/generators.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-IsU3Vt" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/generators.rs" "-Zmiri-tree-borrows" "--edition" "2024" "--cfg=tree" "-Cextra-filename=tree"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/generators.tree.stderr` to the actual output
+++ <stderr output>
error: Undefined Behavior: write access through <1441> at alloc623[0x0] is forbidden
##[error]  --> tests/pass/generators.rs:76:13
   |
LL |             *a = 2;
   |             ^^^^^^ Undefined Behavior occurred here
   |
   = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental
   = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information
   = help: the accessed tag <1441> is a child of the conflicting tag <1412>
   = help: the conflicting tag <1412> has state Frozen which forbids this child write access
help: the accessed tag <1441> was created here
  --> tests/pass/generators.rs:83:17
   |
LL |     let mut j = i;
   |                 ^
help: the conflicting tag <1412> was created here, in the initial state Reserved
  --> tests/pass/generators.rs:73:21
   |
LL |             let a = r;
   |                     ^
help: the conflicting tag <1412> later transitioned to Unique due to a child write access at offsets [0x0..0x1]
  --> tests/pass/generators.rs:74:13
   |
LL |             *a = 1;
   |             ^^^^^^
   = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference
help: the conflicting tag <1412> later transitioned to Frozen due to a reborrow (acting as a foreign read access) at offsets [0x0..0x1]
  --> tests/pass/generators.rs:83:17
   |
LL |     let mut j = i;
   |                 ^
   = help: this transition corresponds to a loss of write permissions
   = note: stack backtrace:
           0: movable_gen::make_gen::{closure#0}
               at tests/pass/generators.rs:76:13: 76:19
---



full stderr:
error: Undefined Behavior: write access through <1441> at alloc623[0x0] is forbidden
##[error]  --> tests/pass/generators.rs:76:13
   |
LL |             *a = 2;
   |             ^^^^^^ Undefined Behavior occurred here
   |
   = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental
   = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information
   = help: the accessed tag <1441> is a child of the conflicting tag <1412>
   = help: the conflicting tag <1412> has state Frozen which forbids this child write access
help: the accessed tag <1441> was created here
  --> tests/pass/generators.rs:83:17
   |
LL |     let mut j = i;
   |                 ^
help: the conflicting tag <1412> was created here, in the initial state Reserved
  --> tests/pass/generators.rs:73:21
   |
LL |             let a = r;
   |                     ^
help: the conflicting tag <1412> later transitioned to Unique due to a child write access at offsets [0x0..0x1]
  --> tests/pass/generators.rs:74:13
   |
LL |             *a = 1;
   |             ^^^^^^
   = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference
help: the conflicting tag <1412> later transitioned to Frozen due to a reborrow (acting as a foreign read access) at offsets [0x0..0x1]
  --> tests/pass/generators.rs:83:17
   |
LL |     let mut j = i;
   |                 ^
   = help: this transition corresponds to a loss of write permissions
   = note: stack backtrace:
           0: movable_gen::make_gen::{closure#0}
               at tests/pass/generators.rs:76:13: 76:19
---



FAILED TEST: tests/pass/generators.rs (revision `tree_implicit_writes`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-IsU3Vt" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/generators.rs" "-Zmiri-tree-borrows" "-Zmiri-tree-borrows-implicit-writes" "--edition" "2024" "--cfg=tree_implicit_writes" "-Cextra-filename=tree_implicit_writes"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/generators.tree_implicit_writes.stderr` to the actual output
+++ <stderr output>
error: Undefined Behavior: write access through <1441> at alloc623[0x0] is forbidden
##[error]  --> tests/pass/generators.rs:76:13
   |
LL |             *a = 2;
   |             ^^^^^^ Undefined Behavior occurred here
   |
   = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental
   = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information
   = help: the accessed tag <1441> is a child of the conflicting tag <1412>
   = help: the conflicting tag <1412> has state Frozen which forbids this child write access
help: the accessed tag <1441> was created here
  --> tests/pass/generators.rs:83:17
   |
LL |     let mut j = i;
   |                 ^
help: the conflicting tag <1412> was created here, in the initial state Reserved
  --> tests/pass/generators.rs:73:21
   |
LL |             let a = r;
   |                     ^
help: the conflicting tag <1412> later transitioned to Unique due to a child write access at offsets [0x0..0x1]
  --> tests/pass/generators.rs:74:13
   |
LL |             *a = 1;
   |             ^^^^^^
   = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference
help: the conflicting tag <1412> later transitioned to Frozen due to a reborrow (acting as a foreign read access) at offsets [0x0..0x1]
  --> tests/pass/generators.rs:83:17
   |
LL |     let mut j = i;
   |                 ^
   = help: this transition corresponds to a loss of write permissions
   = note: stack backtrace:
           0: movable_gen::make_gen::{closure#0}
               at tests/pass/generators.rs:76:13: 76:19
---



full stderr:
error: Undefined Behavior: write access through <1441> at alloc623[0x0] is forbidden
##[error]  --> tests/pass/generators.rs:76:13
   |
LL |             *a = 2;
   |             ^^^^^^ Undefined Behavior occurred here
   |
   = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental
   = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information
   = help: the accessed tag <1441> is a child of the conflicting tag <1412>
   = help: the conflicting tag <1412> has state Frozen which forbids this child write access
help: the accessed tag <1441> was created here
  --> tests/pass/generators.rs:83:17
   |
LL |     let mut j = i;
   |                 ^
help: the conflicting tag <1412> was created here, in the initial state Reserved
  --> tests/pass/generators.rs:73:21
   |
LL |             let a = r;
   |                     ^
help: the conflicting tag <1412> later transitioned to Unique due to a child write access at offsets [0x0..0x1]
  --> tests/pass/generators.rs:74:13
   |
LL |             *a = 1;
   |             ^^^^^^
   = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference
help: the conflicting tag <1412> later transitioned to Frozen due to a reborrow (acting as a foreign read access) at offsets [0x0..0x1]
  --> tests/pass/generators.rs:83:17
   |
LL |     let mut j = i;
   |                 ^
   = help: this transition corresponds to a loss of write permissions
   = note: stack backtrace:
           0: movable_gen::make_gen::{closure#0}
               at tests/pass/generators.rs:76:13: 76:19
---



FAILED TEST: tests/pass/both_borrows/maybe_dangling.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-IsU3Vt" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/both_borrows" "tests/pass/both_borrows/maybe_dangling.rs" "--edition" "2021" "--cfg=stack" "-Cextra-filename=stack"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/both_borrows/maybe_dangling.stack.stderr` to the actual output
+++ <stderr output>
error: Undefined Behavior: deallocating while item [Unique for <557>] is strongly protected
##[error]  --> /checkout/library/alloc/src/boxed.rs:2045:17
   |
LL |                 self.1.deallocate(From::from(ptr.cast()), layout);
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
   |
---
           2: std::mem::drop::<std::boxed::Box<i32>>
               at /checkout/library/core/src/mem/mod.rs:1049:1: 1049:2
           3: closure::{closure#0}
               at tests/pass/both_borrows/maybe_dangling.rs:78:9: 78:42
           4: closure::invoke::<{closure@tests/pass/both_borrows/maybe_dangling.rs:77:12: 77:19}>
               at tests/pass/both_borrows/maybe_dangling.rs:73:9: 73:12
           5: closure
               at tests/pass/both_borrows/maybe_dangling.rs:77:5: 79:7
           6: main
               at tests/pass/both_borrows/maybe_dangling.rs:17:5: 17:14
---



full stderr:
error: Undefined Behavior: deallocating while item [Unique for <557>] is strongly protected
##[error]  --> /checkout/library/alloc/src/boxed.rs:2045:17
   |
LL |                 self.1.deallocate(From::from(ptr.cast()), layout);
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
   |
---
           2: std::mem::drop::<std::boxed::Box<i32>>
               at /checkout/library/core/src/mem/mod.rs:1049:1: 1049:2
           3: closure::{closure#0}
               at tests/pass/both_borrows/maybe_dangling.rs:78:9: 78:42
           4: closure::invoke::<{closure@tests/pass/both_borrows/maybe_dangling.rs:77:12: 77:19}>
               at tests/pass/both_borrows/maybe_dangling.rs:73:9: 73:12
           5: closure
               at tests/pass/both_borrows/maybe_dangling.rs:77:5: 79:7
           6: main
               at tests/pass/both_borrows/maybe_dangling.rs:17:5: 17:14
---



FAILED TEST: tests/pass/both_borrows/maybe_dangling.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-IsU3Vt" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/both_borrows" "tests/pass/both_borrows/maybe_dangling.rs" "-Zmiri-tree-borrows" "--edition" "2021" "--cfg=tree" "-Cextra-filename=tree"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/both_borrows/maybe_dangling.tree.stderr` to the actual output
+++ <stderr output>
error: Undefined Behavior: deallocation through <550> at alloc300[0x0] is forbidden
##[error]  --> /checkout/library/alloc/src/boxed.rs:2045:17
   |
LL |                 self.1.deallocate(From::from(ptr.cast()), layout);
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
   |
---
           2: std::mem::drop::<std::boxed::Box<i32>>
               at /checkout/library/core/src/mem/mod.rs:1049:1: 1049:2
           3: closure::{closure#0}
               at tests/pass/both_borrows/maybe_dangling.rs:78:9: 78:42
           4: closure::invoke::<{closure@tests/pass/both_borrows/maybe_dangling.rs:77:12: 77:19}>
               at tests/pass/both_borrows/maybe_dangling.rs:73:9: 73:12
           5: closure
               at tests/pass/both_borrows/maybe_dangling.rs:77:5: 79:7
           6: main
               at tests/pass/both_borrows/maybe_dangling.rs:17:5: 17:14
---



full stderr:
error: Undefined Behavior: deallocation through <550> at alloc300[0x0] is forbidden
##[error]  --> /checkout/library/alloc/src/boxed.rs:2045:17
   |
LL |                 self.1.deallocate(From::from(ptr.cast()), layout);
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
   |
---
           2: std::mem::drop::<std::boxed::Box<i32>>
               at /checkout/library/core/src/mem/mod.rs:1049:1: 1049:2
           3: closure::{closure#0}
               at tests/pass/both_borrows/maybe_dangling.rs:78:9: 78:42
           4: closure::invoke::<{closure@tests/pass/both_borrows/maybe_dangling.rs:77:12: 77:19}>
               at tests/pass/both_borrows/maybe_dangling.rs:73:9: 73:12
           5: closure
               at tests/pass/both_borrows/maybe_dangling.rs:77:5: 79:7
           6: main
               at tests/pass/both_borrows/maybe_dangling.rs:17:5: 17:14
---



FAILED TEST: tests/pass/both_borrows/maybe_dangling.rs (revision `tree_implicit_writes`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-IsU3Vt" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/both_borrows" "tests/pass/both_borrows/maybe_dangling.rs" "-Zmiri-tree-borrows" "-Zmiri-tree-borrows-implicit-writes" "--edition" "2021" "--cfg=tree_implicit_writes" "-Cextra-filename=tree_implicit_writes"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/both_borrows/maybe_dangling.tree_implicit_writes.stderr` to the actual output
+++ <stderr output>
error: Undefined Behavior: deallocation through <550> at alloc300[0x0] is forbidden
##[error]  --> /checkout/library/alloc/src/boxed.rs:2045:17
   |
LL |                 self.1.deallocate(From::from(ptr.cast()), layout);
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
   |
---
           2: std::mem::drop::<std::boxed::Box<i32>>
               at /checkout/library/core/src/mem/mod.rs:1049:1: 1049:2
           3: closure::{closure#0}
               at tests/pass/both_borrows/maybe_dangling.rs:78:9: 78:42
           4: closure::invoke::<{closure@tests/pass/both_borrows/maybe_dangling.rs:77:12: 77:19}>
               at tests/pass/both_borrows/maybe_dangling.rs:73:9: 73:12
           5: closure
               at tests/pass/both_borrows/maybe_dangling.rs:77:5: 79:7
           6: main
               at tests/pass/both_borrows/maybe_dangling.rs:17:5: 17:14
---



full stderr:
error: Undefined Behavior: deallocation through <550> at alloc300[0x0] is forbidden
##[error]  --> /checkout/library/alloc/src/boxed.rs:2045:17
   |
LL |                 self.1.deallocate(From::from(ptr.cast()), layout);
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
   |
---
           2: std::mem::drop::<std::boxed::Box<i32>>
               at /checkout/library/core/src/mem/mod.rs:1049:1: 1049:2
           3: closure::{closure#0}
               at tests/pass/both_borrows/maybe_dangling.rs:78:9: 78:42
           4: closure::invoke::<{closure@tests/pass/both_borrows/maybe_dangling.rs:77:12: 77:19}>
               at tests/pass/both_borrows/maybe_dangling.rs:73:9: 73:12
           5: closure
               at tests/pass/both_borrows/maybe_dangling.rs:77:5: 79:7
           6: main
               at tests/pass/both_borrows/maybe_dangling.rs:17:5: 17:14
---



FAILED TEST: tests/pass/concurrency/scope.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-IsU3Vt" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass/concurrency" "tests/pass/concurrency/scope.rs" "--edition" "2021"

error: test got exit status: 1, but expected 0
 = note: compilation failed, but was expected to succeed

error: no output was expected
Execute `./miri test --bless` to update `tests/pass/concurrency/scope.stderr` to the actual output
+++ <stderr output>
error: Undefined Behavior: not granting access to tag <10582> because that would remove [SharedReadOnly for <5756>] which is strongly protected
##[error]  --> /checkout/library/alloc/src/vec/mod.rs:1003:17
   |
LL |     pub fn push(&mut self, value: T) {
   |                 ^^^^^^^^^ Undefined Behavior occurred here
   |
   = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental
   = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
help: <10582> was created by a SharedReadWrite retag at offsets [0x0..0x18]
  --> tests/pass/concurrency/scope.rs:22:5
   |
LL |     a.push(4);
   |     ^
help: <5756> is this argument
  --> /checkout/library/std/src/thread/lifecycle.rs:61:22
   |
LL |       let rust_start = move || {
   |  ______________________^
LL | |         let try_result = panic::catch_unwind(panic::AssertUnwindSafe(|| {
LL | |             crate::sys::backtrace::__rust_begin_short_backtrace(|| hooks.inherit_and_run());
LL | |             crate::sys::backtrace::__rust_begin_short_backtrace(f)
...  |
LL | |     };
   | |_____^
   = note: this is on thread `main`
   = note: stack backtrace:
---



full stderr:
error: Undefined Behavior: not granting access to tag <10582> because that would remove [SharedReadOnly for <5756>] which is strongly protected
##[error]  --> /checkout/library/alloc/src/vec/mod.rs:1003:17
   |
LL |     pub fn push(&mut self, value: T) {
   |                 ^^^^^^^^^ Undefined Behavior occurred here
   |
   = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental
   = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
help: <10582> was created by a SharedReadWrite retag at offsets [0x0..0x18]
  --> tests/pass/concurrency/scope.rs:22:5
   |
LL |     a.push(4);
   |     ^
help: <5756> is this argument
  --> /checkout/library/std/src/thread/lifecycle.rs:61:22
   |
LL |       let rust_start = move || {
   |  ______________________^
LL | |         let try_result = panic::catch_unwind(panic::AssertUnwindSafe(|| {
LL | |             crate::sys::backtrace::__rust_begin_short_backtrace(|| hooks.inherit_and_run());
LL | |             crate::sys::backtrace::__rust_begin_short_backtrace(f)
...  |
LL | |     };
   | |_____^
   = note: this is on thread `main`
   = note: stack backtrace:
---

Location:
   /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ui_test-0.30.7/src/lib.rs:365

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
error: test failed, to rerun pass `--test ui`

Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/build/miri/54d3518e03e017c2/out/ui-54d3518e03e017c2` (exit status: 1)
Bootstrap failed while executing `test --stage 2 miri cargo-miri`
Currently active steps:
test::Miri { target: x86_64-unknown-linux-gnu } at src/bootstrap/src/core/build_steps/test.rs:716
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo test --target x86_64-unknown-linux-gnu -Zbinary-dep-depinfo -j 4 -Zroot-dir=/checkout -Zembed-metadata=no --locked --color=always --profile=release --manifest-path /checkout/src/tools/miri/Cargo.toml -- [workdir=/checkout]` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:208:21
Executed at: src/bootstrap/src/core/build_steps/test.rs:790:19

Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:46:03
  local time: Sun Sep  6 09:50:08 UTC 2026
  network time: Sun, 06 Sep 2026 09:50:08 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

@rust-bors

rust-bors Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 53adad8 (53adad86ea8dd1518c719893cfc8f19dc743b965)
Base parent: 46a266b (46a266b9fb0fb75e05fa4c9132f7355fcb62d4a4)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (53adad8): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never rustc-perf
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.3% [0.3%, 0.4%] 4
Improvements ✅
(primary)
-0.3% [-0.7%, -0.2%] 67
Improvements ✅
(secondary)
-0.3% [-0.4%, -0.2%] 19
All ❌✅ (primary) -0.3% [-0.7%, -0.2%] 67

Max RSS (memory usage)

Results (primary -4.5%, secondary 1.2%)

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)
3.5% [2.5%, 4.5%] 2
Improvements ✅
(primary)
-4.5% [-4.5%, -4.5%] 1
Improvements ✅
(secondary)
-3.5% [-3.5%, -3.5%] 1
All ❌✅ (primary) -4.5% [-4.5%, -4.5%] 1

Cycles

Results (primary 0.4%)

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

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

Binary size

Results (primary 0.0%)

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

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

Bootstrap: 478.283s -> 476.002s (-0.48%)
Artifact size: 403.38 MiB -> 403.31 MiB (-0.02%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 6, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants