Skip to content

[perf] test MCP510 #113382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

[perf] test MCP510 #113382

wants to merge 6 commits into from

Conversation

lqd
Copy link
Member

@lqd lqd commented Jul 5, 2023

r? @ghost

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 5, 2023
@lqd
Copy link
Member Author

lqd commented Jul 5, 2023

Let's see if the bootstrapping cfgs are correctly set up.

@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 Jul 5, 2023
@bors

This comment was marked as outdated.

@bors

This comment was marked as outdated.

1 similar comment
@bors

This comment was marked as duplicate.

@rust-timer

This comment has been minimized.

@lqd
Copy link
Member Author

lqd commented Jul 5, 2023

Let's see if the bootstrapping cfgs are correctly set up.

$  cargo +4cb98396e9dc17fbe9b0da2b1bd35d9b05fff30c build -q && readelf -p .comment ./target/debug/helloworld

String dump of section '.comment':
  [     0]  GCC: (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
  [    2d]  Linker: LLD 16.0.5

Looks like yes?

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4cb98396e9dc17fbe9b0da2b1bd35d9b05fff30c): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

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

Warning ⚠: The following benchmark(s) failed to build:

  • rustc

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-34.1% [-74.8%, -0.6%] 31
Improvements ✅
(secondary)
-32.7% [-74.0%, -3.7%] 74
All ❌✅ (primary) -34.1% [-74.8%, -0.6%] 31

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
27.8% [21.9%, 33.7%] 2
Regressions ❌
(secondary)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 27.8% [21.9%, 33.7%] 2

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-32.3% [-65.9%, -1.4%] 28
Improvements ✅
(secondary)
-28.4% [-64.8%, -3.3%] 73
All ❌✅ (primary) -32.3% [-65.9%, -1.4%] 28

Binary size

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.6% [0.6%, 2.4%] 20
Regressions ❌
(secondary)
0.5% [0.4%, 1.1%] 61
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.4%, -0.1%] 2
All ❌✅ (primary) 1.6% [0.6%, 2.4%] 20

Bootstrap: missing data

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 5, 2023
@lqd
Copy link
Member Author

lqd commented Jul 18, 2023

The data gathering is done so I'll close this for now, but may reopen to rerun crater on these new try artifacts.

@lqd lqd closed this Jul 18, 2023
@lqd lqd reopened this Sep 12, 2023
@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Sep 12, 2023
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment was marked as resolved.

@rust-log-analyzer

This comment was marked as outdated.

@rust-log-analyzer

This comment was marked as resolved.

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jun 13, 2025

⌛ Trying commit c72a184 with merge c2f0a98

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jun 13, 2025
[perf] test MCP510

r? `@ghost`
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 13, 2025
@rust-bors
Copy link

rust-bors bot commented Jun 13, 2025

☀️ Try build successful (CI)
Build commit: c2f0a98 (c2f0a98140548e5c1389a7f0ab9f2db221ac7c7e, parent: 015c7770ec0ffdba9ff03f1861144a827497f8ca)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c2f0a98): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@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
Improvements ✅
(primary)
-0.9% [-1.1%, -0.6%] 4
Improvements ✅
(secondary)
-0.6% [-0.7%, -0.4%] 4
All ❌✅ (primary) -0.9% [-1.1%, -0.6%] 4

Max RSS (memory usage)

Results (primary -1.2%)

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

mean range count
Regressions ❌
(primary)
1.3% [1.3%, 1.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.7% [-2.2%, -1.3%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.2% [-2.2%, 1.3%] 6

Cycles

Results (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.8% [3.7%, 4.0%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.9% [-3.7%, -2.0%] 2
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 754.993s -> 756.812s (0.24%)
Artifact size: 372.27 MiB -> 372.22 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 13, 2025
@bors
Copy link
Collaborator

bors commented Jun 16, 2025

☔ The latest upstream changes (presumably #142471) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 16, 2025
@rustbot rustbot added the A-compiletest Area: The compiletest test runner label Jun 16, 2025
@lqd
Copy link
Member Author

lqd commented Jun 16, 2025

let's see what the currently worst case is

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jun 16, 2025

⌛ Trying commit 55927af with merge e574083

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jun 16, 2025
[perf] test MCP510

r? `@ghost`
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 16, 2025
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-19-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

failures:

---- [ui] tests/ui/drop/dropck-normalize-errors.rs#nll stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/drop/dropck-normalize-errors.nll/dropck-normalize-errors.nll.stderr`
diff of stderr:

59 LL | trait NonImplementedTrait {
60    | ^^^^^^^^^^^^^^^^^^^^^^^^^
61 
- error[E0277]: the trait bound `NonImplementedStruct: NonImplementedTrait` is not satisfied
-   --> $DIR/dropck-normalize-errors.rs:19:28
-    |
- LL | fn make_a_decoder<'a>() -> ADecoder<'a> {
-    |                            ^^^^^^^^^^^^ the trait `NonImplementedTrait` is not implemented for `NonImplementedStruct`
-    |
- help: this trait has no implementations, consider adding one
-   --> $DIR/dropck-normalize-errors.rs:11:1
-    |
- LL | trait NonImplementedTrait {
---
The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args drop/dropck-normalize-errors.rs`

error in revision `nll`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/drop/dropck-normalize-errors.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--cfg" "nll" "--check-cfg" "cfg(test,FALSE,nll,polonius)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/drop/dropck-normalize-errors.nll" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `NonImplementedStruct: NonImplementedTrait` is not satisfied in `ADecoder<'a>`
##[error]  --> /checkout/tests/ui/drop/dropck-normalize-errors.rs:19:28
   |
LL | fn make_a_decoder<'a>() -> ADecoder<'a> {
   |                            ^^^^^^^^^^^^ within `ADecoder<'a>`, the trait `NonImplementedTrait` is not implemented for `NonImplementedStruct`
   |
help: this trait has no implementations, consider adding one
  --> /checkout/tests/ui/drop/dropck-normalize-errors.rs:11:1
   |
LL | trait NonImplementedTrait {
---
LL | pub struct ADecoder<'a> {
   |            ^^^^^^^^
   = note: the return type of a function must have a statically known size

error[E0277]: the trait bound `NonImplementedStruct: NonImplementedTrait` is not satisfied in `BDecoder`
##[error]  --> /checkout/tests/ui/drop/dropck-normalize-errors.rs:27:20
   |
LL |     type Decoder = BDecoder;
   |                    ^^^^^^^^ within `BDecoder`, the trait `NonImplementedTrait` is not implemented for `NonImplementedStruct`
   |
help: this trait has no implementations, consider adding one
  --> /checkout/tests/ui/drop/dropck-normalize-errors.rs:11:1
   |
LL | trait NonImplementedTrait {
---

error[E0277]: the trait bound `NonImplementedStruct: NonImplementedTrait` is not satisfied
##[error]  --> /checkout/tests/ui/drop/dropck-normalize-errors.rs:31:22
   |
LL |     non_implemented: <NonImplementedStruct as NonImplementedTrait>::Assoc,
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NonImplementedTrait` is not implemented for `NonImplementedStruct`
   |
help: this trait has no implementations, consider adding one
  --> /checkout/tests/ui/drop/dropck-normalize-errors.rs:11:1
   |
LL | trait NonImplementedTrait {
---
diff of stderr:

2   --> $DIR/dropck_trait_cycle_checked.rs:111:13
3    |
4 LL |     let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
-    |              -- binding `o2` declared here                          -------- coercion requires that `o2` is borrowed for `'static`
+    |              -- binding `o2` declared here
6 LL |     o1.set0(&o2);
7    |             ^^^ borrowed value does not live long enough
8 ...

9 LL | }
-    | - `o2` dropped here while still borrowed
+    | -
+    | |
+    | `o2` dropped here while still borrowed
+    | borrow might be used here, when `o1` is dropped and runs the destructor for type `Box<dyn Obj<'_>>`
11    |
-    = note: due to object lifetime defaults, `Box<dyn Obj<'_>>` actually means `Box<(dyn Obj<'_> + 'static)>`
+    = note: values in a scope are dropped in the opposite order they are defined
13 
14 error[E0597]: `o3` does not live long enough
15   --> $DIR/dropck_trait_cycle_checked.rs:112:13

16    |
17 LL |     let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
-    |                  -- binding `o3` declared here                      -------- coercion requires that `o3` is borrowed for `'static`
+    |                  -- binding `o3` declared here
19 LL |     o1.set0(&o2);
20 LL |     o1.set1(&o3);
21    |             ^^^ borrowed value does not live long enough

22 ...
23 LL | }
-    | - `o3` dropped here while still borrowed
+    | -
+    | |
+    | `o3` dropped here while still borrowed
+    | borrow might be used here, when `o1` is dropped and runs the destructor for type `Box<dyn Obj<'_>>`
25    |
-    = note: due to object lifetime defaults, `Box<dyn Obj<'_>>` actually means `Box<(dyn Obj<'_> + 'static)>`
+    = note: values in a scope are dropped in the opposite order they are defined
27 
28 error[E0597]: `o2` does not live long enough
29   --> $DIR/dropck_trait_cycle_checked.rs:113:13

57   --> $DIR/dropck_trait_cycle_checked.rs:115:13
58    |
59 LL |     let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
-    |          -- binding `o1` declared here                                                  -------- coercion requires that `o1` is borrowed for `'static`
+    |          -- binding `o1` declared here
61 ...
62 LL |     o3.set0(&o1);
63    |             ^^^ borrowed value does not live long enough

64 LL |     o3.set1(&o2);
65 LL | }
-    | - `o1` dropped here while still borrowed
-    |
-    = note: due to object lifetime defaults, `Box<dyn Obj<'_>>` actually means `Box<(dyn Obj<'_> + 'static)>`
+    | -
+    | |
+    | `o1` dropped here while still borrowed
+    | borrow might be used here, when `o1` is dropped and runs the destructor for type `Box<dyn Obj<'_>>`
69 
70 error[E0597]: `o2` does not live long enough
71   --> $DIR/dropck_trait_cycle_checked.rs:116:13


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args dropck/dropck_trait_cycle_checked.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/dropck/dropck_trait_cycle_checked.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/dropck/dropck_trait_cycle_checked" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0597]: `o2` does not live long enough
##[error]  --> /checkout/tests/ui/dropck/dropck_trait_cycle_checked.rs:111:13
   |
LL |     let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
   |              -- binding `o2` declared here
LL |     o1.set0(&o2); //~ ERROR `o2` does not live long enough
   |             ^^^ borrowed value does not live long enough
...
LL | }
   | -
   | |
   | `o2` dropped here while still borrowed
   | borrow might be used here, when `o1` is dropped and runs the destructor for type `Box<dyn Obj<'_>>`
   |
   = note: values in a scope are dropped in the opposite order they are defined

error[E0597]: `o3` does not live long enough
##[error]  --> /checkout/tests/ui/dropck/dropck_trait_cycle_checked.rs:112:13
   |
LL |     let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
   |                  -- binding `o3` declared here
LL |     o1.set0(&o2); //~ ERROR `o2` does not live long enough
LL |     o1.set1(&o3); //~ ERROR `o3` does not live long enough
   |             ^^^ borrowed value does not live long enough
...
LL | }
   | -
   | |
   | `o3` dropped here while still borrowed
   | borrow might be used here, when `o1` is dropped and runs the destructor for type `Box<dyn Obj<'_>>`
   |
   = note: values in a scope are dropped in the opposite order they are defined

error[E0597]: `o2` does not live long enough
##[error]  --> /checkout/tests/ui/dropck/dropck_trait_cycle_checked.rs:113:13
   |
LL |     let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
   |              -- binding `o2` declared here                                    -------- coercion requires that `o2` is borrowed for `'static`
...
LL |     o2.set0(&o2); //~ ERROR `o2` does not live long enough
   |             ^^^ borrowed value does not live long enough
...
LL | }
   | - `o2` dropped here while still borrowed
   |
   = note: due to object lifetime defaults, `Box<dyn Obj<'_>>` actually means `Box<(dyn Obj<'_> + 'static)>`

error[E0597]: `o3` does not live long enough
##[error]  --> /checkout/tests/ui/dropck/dropck_trait_cycle_checked.rs:114:13
   |
LL |     let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
   |                  -- binding `o3` declared here                                -------- coercion requires that `o3` is borrowed for `'static`
...
LL |     o2.set1(&o3); //~ ERROR `o3` does not live long enough
   |             ^^^ borrowed value does not live long enough
...
LL | }
   | - `o3` dropped here while still borrowed
   |
   = note: due to object lifetime defaults, `Box<dyn Obj<'_>>` actually means `Box<(dyn Obj<'_> + 'static)>`

error[E0597]: `o1` does not live long enough
##[error]  --> /checkout/tests/ui/dropck/dropck_trait_cycle_checked.rs:115:13
   |
LL |     let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
   |          -- binding `o1` declared here
...
LL |     o3.set0(&o1); //~ ERROR `o1` does not live long enough
   |             ^^^ borrowed value does not live long enough
LL |     o3.set1(&o2); //~ ERROR `o2` does not live long enough
LL | }
   | -
   | |
   | `o1` dropped here while still borrowed
   | borrow might be used here, when `o1` is dropped and runs the destructor for type `Box<dyn Obj<'_>>`

error[E0597]: `o2` does not live long enough
##[error]  --> /checkout/tests/ui/dropck/dropck_trait_cycle_checked.rs:116:13
   |
LL |     let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
   |              -- binding `o2` declared here                                              -------- coercion requires that `o2` is borrowed for `'static`
...
LL |     o3.set1(&o2); //~ ERROR `o2` does not live long enough
   |             ^^^ borrowed value does not live long enough
LL | }
   | - `o2` dropped here while still borrowed
   |
   = note: due to object lifetime defaults, `Box<dyn Obj<'_>>` actually means `Box<(dyn Obj<'_> + 'static)>`

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0597`.
------------------------------------------


---- [ui] tests/ui/nll/get_default.rs#nll stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/nll/get_default.nll/get_default.nll.stderr`
diff of stderr:

1 error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable
-   --> $DIR/get_default.rs:24:17
-    |
- LL | fn ok(map: &mut Map) -> &String {
-    |            - let's call the lifetime of this reference `'1`
- LL |     loop {
- LL |         match map.get() {
-    |               --- immutable borrow occurs here
- LL |             Some(v) => {
- LL |                 return v;
-    |                        - returning this value requires that `*map` is borrowed for `'1`
- ...
- LL |                 map.set(String::new()); // Ideally, this would not error.
-    |                 ^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here
- 
- error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable
17   --> $DIR/get_default.rs:35:17
18    |
19 LL | fn err(map: &mut Map) -> &String {

28 LL |                 return v;
29    |                        - returning this value requires that `*map` is borrowed for `'1`
30 
- error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable
-   --> $DIR/get_default.rs:40:17
-    |
- LL | fn err(map: &mut Map) -> &String {
-    |             - let's call the lifetime of this reference `'1`
- LL |     loop {
- LL |         match map.get() {
-    |               --- immutable borrow occurs here
- ...
- LL |                 return v;
-    |                        - returning this value requires that `*map` is borrowed for `'1`
- ...
- LL |                 map.set(String::new()); // Ideally, this would not error.
-    |                 ^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here
- 
- error: aborting due to 3 previous errors
+ error: aborting due to 1 previous error
47 
48 For more information about this error, try `rustc --explain E0502`.
49 


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args nll/get_default.rs`

error in revision `nll`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/nll/get_default.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--cfg" "nll" "--check-cfg" "cfg(test,FALSE,nll,polonius,legacy)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/nll/get_default.nll" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable
##[error]  --> /checkout/tests/ui/nll/get_default.rs:35:17
   |
LL | fn err(map: &mut Map) -> &String {
   |             - let's call the lifetime of this reference `'1`
LL |     loop {
LL |         match map.get() {
   |               --- immutable borrow occurs here
LL |             Some(v) => {
LL |                 map.set(String::new()); // We always expect an error here.
   |                 ^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here
LL |                 //~^ ERROR borrowed as immutable
LL |                 return v;
   |                        - returning this value requires that `*map` is borrowed for `'1`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0502`.
------------------------------------------


---- [ui] tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1/unboxed-closures-failed-recursive-fn-1.stderr`
diff of stderr:

33   --> $DIR/unboxed-closures-failed-recursive-fn-1.rs:28:17
34    |
35 LL |     let mut factorial: Option<Box<dyn Fn(u32) -> u32 + 'static>> = None;
-    |         -------------  ----------------------------------------- type annotation requires that `factorial` is borrowed for `'static`
-    |         |
-    |         binding `factorial` declared here
+    |         ------------- binding `factorial` declared here
39 LL |
40 LL |     let f = |x: u32| -> u32 {
41    |             --------------- value captured here

43    |                 ^^^^^^^^^ borrowed value does not live long enough
44 ...
45 LL | }
-    | - `factorial` dropped here while still borrowed
+    | -
+    | |
+    | `factorial` dropped here while still borrowed
+    | borrow might be used here, when `factorial` is dropped and runs the destructor for type `Option<Box<dyn Fn(u32) -> u32>>`
47 
48 error[E0506]: cannot assign to `factorial` because it is borrowed
49   --> $DIR/unboxed-closures-failed-recursive-fn-1.rs:33:5


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0597]: `factorial` does not live long enough
##[error]  --> /checkout/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs:15:17
   |
LL |     let mut factorial: Option<Box<dyn Fn(u32) -> u32>> = None;
   |         ------------- binding `factorial` declared here
LL |
LL |     let f = |x: u32| -> u32 {
   |             --------------- value captured here
LL |         let g = factorial.as_ref().unwrap();
   |                 ^^^^^^^^^ borrowed value does not live long enough
...
LL | }
   | -
   | |
   | `factorial` dropped here while still borrowed
   | borrow might be used here, when `factorial` is dropped and runs the destructor for type `Option<Box<dyn Fn(u32) -> u32>>`

error[E0506]: cannot assign to `factorial` because it is borrowed
##[error]  --> /checkout/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs:20:5
   |
LL |     let f = |x: u32| -> u32 {
   |             --------------- `factorial` is borrowed here
LL |         let g = factorial.as_ref().unwrap();
   |                 --------- borrow occurs due to use in closure
...
LL |     factorial = Some(Box::new(f));
   |     ^^^^^^^^^
   |     |
   |     `factorial` is assigned to here but it was already borrowed
   |     borrow later used here

error[E0597]: `factorial` does not live long enough
##[error]  --> /checkout/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs:28:17
   |
LL |     let mut factorial: Option<Box<dyn Fn(u32) -> u32 + 'static>> = None;
   |         ------------- binding `factorial` declared here
LL |
LL |     let f = |x: u32| -> u32 {
   |             --------------- value captured here
LL |         let g = factorial.as_ref().unwrap();
   |                 ^^^^^^^^^ borrowed value does not live long enough
...
LL | }
   | -
   | |
   | `factorial` dropped here while still borrowed
   | borrow might be used here, when `factorial` is dropped and runs the destructor for type `Option<Box<dyn Fn(u32) -> u32>>`

error[E0506]: cannot assign to `factorial` because it is borrowed
##[error]  --> /checkout/tests/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.rs:33:5
   |
LL |     let mut factorial: Option<Box<dyn Fn(u32) -> u32 + 'static>> = None;
   |                        ----------------------------------------- type annotation requires that `factorial` is borrowed for `'static`
LL |
LL |     let f = |x: u32| -> u32 {
   |             --------------- `factorial` is borrowed here
LL |         let g = factorial.as_ref().unwrap();
   |                 --------- borrow occurs due to use in closure
...
LL |     factorial = Some(Box::new(f));
   |     ^^^^^^^^^ `factorial` is assigned to here but it was already borrowed

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0506, E0597.
For more information about an error, try `rustc --explain E0506`.
------------------------------------------


---- [ui] tests/ui/wf/hir-wf-check-erase-regions.rs#nll stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/wf/hir-wf-check-erase-regions.nll/hir-wf-check-erase-regions.nll.stderr`
diff of stderr:

34 note: required by a bound in `Flatten`
35   --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
36 
- error[E0277]: `&T` is not an iterator
-   --> $DIR/hir-wf-check-erase-regions.rs:15:27
-    |
- LL |     fn into_iter(self) -> Self::IntoIter {
-    |                           ^^^^^^^^^^^^^^ `&T` is not an iterator
-    |
-    = help: the trait `Iterator` is not implemented for `&T`
-    = help: the trait `Iterator` is implemented for `&mut I`
-    = note: required for `&T` to implement `IntoIterator`
- 
---
The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args wf/hir-wf-check-erase-regions.rs`

error in revision `nll`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/wf/hir-wf-check-erase-regions.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--cfg" "nll" "--check-cfg" "cfg(test,FALSE,nll,polonius)" "-C" "incremental=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/wf/hir-wf-check-erase-regions.nll/hir-wf-check-erase-regions.inc" "-Z" "incremental-verify-ich" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/wf/hir-wf-check-erase-regions.nll" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: `&'a T` is not an iterator
##[error]  --> /checkout/tests/ui/wf/hir-wf-check-erase-regions.rs:11:21
   |
LL |     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>; //~ ERROR `&'a T` is not an iterator
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&'a T` is not an iterator
   |
   = help: the trait `Iterator` is not implemented for `&'a T`
   = help: the trait `Iterator` is implemented for `&mut I`
   = note: required for `Flatten<std::slice::Iter<'a, T>>` to implement `Iterator`
note: required by a bound in `std::iter::IntoIterator::IntoIter`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/traits/collect.rs:289:5

error[E0277]: `&'a T` is not an iterator
##[error]  --> /checkout/tests/ui/wf/hir-wf-check-erase-regions.rs:11:21
   |
LL |     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>; //~ ERROR `&'a T` is not an iterator
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&'a T` is not an iterator
   |
   = help: the trait `Iterator` is not implemented for `&'a T`
   = help: the trait `Iterator` is implemented for `&mut I`
   = note: required for `&'a T` to implement `IntoIterator`
note: required by a bound in `Flatten`
  --> /rustc/FAKE_PREFIX/library/core/src/iter/adapters/flatten.rs:184:1

error[E0277]: `&'a T` is not an iterator
##[error]  --> /checkout/tests/ui/wf/hir-wf-check-erase-regions.rs:15:27
   |
LL |     fn into_iter(self) -> Self::IntoIter {
   |                           ^^^^^^^^^^^^^^ `&'a T` is not an iterator
   |
   = help: the trait `Iterator` is not implemented for `&'a T`
   = help: the trait `Iterator` is implemented for `&mut I`
   = note: required for `&'a T` to implement `IntoIterator`
note: required by a bound in `Flatten`

@rust-bors
Copy link

rust-bors bot commented Jun 16, 2025

☀️ Try build successful (CI)
Build commit: e574083 (e574083192d6371fe59e576a2ca0e93d0f9dffd0, parent: d9ca9bd014074e2bac567eaa2b66bfacb2591028)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e574083): comparison URL.

Overall result: ❌ regressions - BENCHMARK(S) FAILED

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

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

❗ ❗ ❗ ❗ ❗
Warning ⚠️: The following benchmark(s) failed to build:

  • coercions

❗ ❗ ❗ ❗ ❗

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)
5.9% [0.1%, 63.8%] 196
Regressions ❌
(secondary)
1625.3% [0.1%, 61565.9%] 170
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.8% [-0.9%, -0.6%] 2
All ❌✅ (primary) 5.9% [0.1%, 63.8%] 196

Max RSS (memory usage)

Results (primary 21.3%, secondary 38.6%)

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

mean range count
Regressions ❌
(primary)
21.3% [0.9%, 65.1%] 26
Regressions ❌
(secondary)
47.4% [0.9%, 189.9%] 39
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.2% [-8.3%, -1.3%] 8
All ❌✅ (primary) 21.3% [0.9%, 65.1%] 26

Cycles

Results (primary 9.2%, secondary 3091.4%)

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

mean range count
Regressions ❌
(primary)
9.2% [0.7%, 63.2%] 98
Regressions ❌
(secondary)
3091.4% [1.2%, 63942.2%] 91
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 9.2% [0.7%, 63.2%] 98

Binary size

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

Bootstrap: 756.489s -> 802.349s (6.06%)
Artifact size: 372.07 MiB -> 371.09 MiB (-0.26%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool perf-regression Performance regression. S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants