rust icon indicating copy to clipboard operation
rust copied to clipboard

Stop storing a special inner body for the coroutine by-move body for async closures

Open compiler-errors opened this issue 1 year ago • 43 comments

...and instead, just synthesize an item which is treated mostly normally by the MIR pipeline.

This PR does a few things:

  • We synthesize a new DefId for the by-move body of a closure, which has its mir_built fed with the output of the ByMoveBody MIR transformation, and some other relevant queries.
  • This has the DefKind::ByMoveBody, which we use to distinguish it from "real" bodies (that come from HIR) which need to be borrowck'd. Introduce TyCtxt::is_synthetic_mir to skip over mir_borrowck which is called by mir_promoted; borrowck isn't really possible to make work ATM since it heavily relies being called on a body generated from HIR, and is redundant by the construction of the by-move-body.
  • Remove the special PassManager hacks for handling the inner by_move_body stored within the coroutine's mir body. Instead, this body is fed like a regular MIR body, so it's goes through all of the tcx.*_mir stages normally (build -> promoted -> ...etc... -> optimized) ✨.
  • Remove the InstanceKind::ByMoveBody shim, since now we have a "regular" def id, we can just use InstanceKind::Item. This also allows us to remove the corresponding hacks from codegen, such as in fn_sig_for_fn_abi ✨.

Notable remarks:

  • ~~I know it's kind of weird to be using DefKind::Closure here, since it's not a distinct closure but just a new MIR body. I don't believe it really matters, but I could also use a different DefKind... maybe one that we could use for synthetic MIR bodies in general?~~ edit: We're doing this now.

compiler-errors avatar Aug 01 '24 17:08 compiler-errors

r? @chenyukang

rustbot has assigned @chenyukang. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

rustbot avatar Aug 01 '24 17:08 rustbot

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

rustbot avatar Aug 01 '24 17:08 rustbot

Ah wait, mir-opt tests are gonna explode because of the new naming scheme.

compiler-errors avatar Aug 01 '24 17:08 compiler-errors

Anywhomst, cc @RalfJung if you're curious about what this ended up looking like.

compiler-errors avatar Aug 01 '24 17:08 compiler-errors

Let's get perf kicked off. I'll fix the codegen tests when I get home.

@bors try @rust-timer queue

compiler-errors avatar Aug 01 '24 17:08 compiler-errors

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

rust-timer avatar Aug 01 '24 17:08 rust-timer

:hourglass: Trying commit 36ed446189159358dac50faa8e500da35ddd21bc with merge 3904d9726c8057476f260c7c166008d0eb4f50e4...

bors avatar Aug 01 '24 17:08 bors

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

Click to see the possible cause of the failure (guessed by this bot)
------
 > importing cache manifest from ghcr.io/rust-lang/rust-ci-cache:3aacb9c90579defe09351ac5e8ee504359f8054da6326ff19038f1b7c90e3cb2aafe33685c6d9b76ee8d2ccbd187ca80c46ab5380485abdd8c0ce7d69cd8d8fd:
------
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-17]
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-17', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-17/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
...................................

failures:

---- [mir-opt] tests/mir-opt/async_closure_shims.rs stdout ----
thread '[mir-opt] tests/mir-opt/async_closure_shims.rs' panicked at src/tools/compiletest/src/runtest.rs:4171:21:
Output file `/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/async_closure_shims/async_closure_shims.main-{closure#0}-{closure#0}-{closure#0}.coroutine_by_move.0.mir` from test does not exist, available files are in `/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/async_closure_shims`


failures:
    [mir-opt] tests/mir-opt/async_closure_shims.rs

rust-log-analyzer avatar Aug 01 '24 17:08 rust-log-analyzer

:sunny: Try build successful - checks-actions Build commit: 3904d9726c8057476f260c7c166008d0eb4f50e4 (3904d9726c8057476f260c7c166008d0eb4f50e4)

bors avatar Aug 01 '24 19:08 bors

Queued 3904d9726c8057476f260c7c166008d0eb4f50e4 with parent e60ebb2f2c1facba87e7971798f3cbdfd309cd23, future comparison URL. There are currently 9 preceding artifacts in the queue. It will probably take at least ~11.9 hours until the benchmark run finishes.

rust-timer avatar Aug 01 '24 19:08 rust-timer

Finished benchmarking commit (3904d9726c8057476f260c7c166008d0eb4f50e4): comparison URL.

Overall result: ❌ regressions - 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.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

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

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.4% [0.2%, 0.8%] 54
Regressions ❌
(secondary)
0.7% [0.2%, 1.1%] 18
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [0.2%, 0.8%] 54

Max RSS (memory usage)

Results (primary 5.4%, secondary 8.5%)

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)
5.4% [0.6%, 16.9%] 7
Regressions ❌
(secondary)
8.5% [6.8%, 11.8%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 5.4% [0.6%, 16.9%] 7

Cycles

Results (primary 1.7%)

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.7% [1.2%, 2.1%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.7% [1.2%, 2.1%] 2

Binary size

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

Bootstrap: 756.054s -> 761.062s (0.66%) Artifact size: 336.95 MiB -> 337.01 MiB (0.02%)

rust-timer avatar Aug 02 '24 14:08 rust-timer

If this doesn't help things, I'll investigate adding a new DefKind::SyntheticBody or something, to avoid needing to add tcx.is_synthetic_mir as a query.

compiler-errors avatar Aug 02 '24 15:08 compiler-errors

@bors try @rust-timer queue

compiler-errors avatar Aug 02 '24 15:08 compiler-errors

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

rust-timer avatar Aug 02 '24 15:08 rust-timer

:hourglass: Trying commit bca0ea9388eb5b1819c0e41a74234b2e9ec3ebae with merge a92413ef71861b452527dbb557b8fe39515d974e...

bors avatar Aug 02 '24 15:08 bors

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#16 2.804 Building wheels for collected packages: reuse
#16 2.805   Building wheel for reuse (pyproject.toml): started
#16 3.049   Building wheel for reuse (pyproject.toml): finished with status 'done'
#16 3.050   Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132715 sha256=dfa09868353292d98f811d3efdb0d54d07389e808efc71d68e3b93c514bf8bec
#16 3.050   Stored in directory: /tmp/pip-ephem-wheel-cache-9gqj7bap/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#16 3.053 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#16 3.446 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#16 3.447 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#16 DONE 3.5s
---
    Checking rustc_borrowck v0.0.0 (/checkout/compiler/rustc_borrowck)
    Checking rustc_passes v0.0.0 (/checkout/compiler/rustc_passes)
    Checking rustc_mir_transform v0.0.0 (/checkout/compiler/rustc_mir_transform)
    Checking rustc_codegen_llvm v0.0.0 (/checkout/compiler/rustc_codegen_llvm)
error[E0609]: no field `by_move_body` on type `&mut std::boxed::Box<CoroutineInfo<'_>>`
    |
    |
351 |         if let Some(by_move_body) = coroutine.by_move_body.as_mut() {
    |
    |
    = note: available fields are: `yield_ty`, `resume_ty`, `coroutine_drop`, `coroutine_layout`, `coroutine_kind`

error[E0609]: no field `by_move_body` on type `&mut std::boxed::Box<CoroutineInfo<'_>>`
    |
    |
676 |         if let Some(by_move_body) = coroutine.by_move_body.as_mut() {
    |
    |
    = note: available fields are: `yield_ty`, `resume_ty`, `coroutine_drop`, `coroutine_layout`, `coroutine_kind`
    Checking rustc_hir_typeck v0.0.0 (/checkout/compiler/rustc_hir_typeck)
For more information about this error, try `rustc --explain E0609`.
error: could not compile `rustc_mir_transform` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

rust-log-analyzer avatar Aug 02 '24 16:08 rust-log-analyzer

The job dist-x86_64-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
file:.git/config remote.origin.url=https://github.com/rust-lang-ci/rust
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config gc.auto=0
file:.git/config http.https://github.com/.extraheader=AUTHORIZATION: basic ***
file:.git/config branch.try.remote=origin
file:.git/config branch.try.merge=refs/heads/try
file:.git/config submodule.library/backtrace.url=https://github.com/rust-lang/backtrace-rs.git
file:.git/config submodule.library/stdarch.active=true
file:.git/config submodule.library/stdarch.url=https://github.com/rust-lang/stdarch.git
file:.git/config submodule.src/doc/book.active=true
---
[RUSTC-TIMING] rustc_codegen_ssa test:false 35.756
   Compiling rustc_mir_transform v0.0.0 (/checkout/compiler/rustc_mir_transform)
[RUSTC-TIMING] rustc_traits test:false 21.050
[RUSTC-TIMING] rustc_metadata test:false 40.414
error[E0609]: no field `by_move_body` on type `&mut std::boxed::Box<CoroutineInfo<'_>>`
    |
    |
351 |         if let Some(by_move_body) = coroutine.by_move_body.as_mut() {
    |
    |
    = note: available fields are: `yield_ty`, `resume_ty`, `coroutine_drop`, `coroutine_layout`, `coroutine_kind`

error[E0609]: no field `by_move_body` on type `&mut std::boxed::Box<CoroutineInfo<'_>>`
    |
    |
676 |         if let Some(by_move_body) = coroutine.by_move_body.as_mut() {
    |
    |
    = note: available fields are: `yield_ty`, `resume_ty`, `coroutine_drop`, `coroutine_layout`, `coroutine_kind`
[RUSTC-TIMING] rustc_ty_utils test:false 22.385
For more information about this error, try `rustc --explain E0609`.
[RUSTC-TIMING] rustc_mir_transform test:false 4.491
error: could not compile `rustc_mir_transform` (lib) due to 2 previous errors
---
Caused by:
    Command RUST_BACKTRACE=full python3 /checkout/x.py build --target x86_64-unknown-linux-gnu --host x86_64-unknown-linux-gnu --stage 2 library/std --rust-profile-generate /tmp/tmp-multistage/opt-artifacts/rustc-pgo --set llvm.thin-lto=false --set llvm.link-shared=true [at /checkout/obj] has failed with exit code Some(1)

Stack backtrace:
   0: <anyhow::Error>::msg::<alloc::string::String>
             at /rust/deps/anyhow-1.0.86/src/backtrace.rs:27:14
   1: <opt_dist::exec::CmdBuilder>::run
             at /rustc/a92413ef71861b452527dbb557b8fe39515d974e/src/tools/opt-dist/src/exec.rs:80:17
   2: <opt_dist::exec::Bootstrap>::run
             at /rustc/a92413ef71861b452527dbb557b8fe39515d974e/src/tools/opt-dist/src/exec.rs:181:9
             at /rustc/a92413ef71861b452527dbb557b8fe39515d974e/src/tools/opt-dist/src/main.rs:225:13
             at /rustc/a92413ef71861b452527dbb557b8fe39515d974e/src/tools/opt-dist/src/main.rs:225:13
   4: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}::{closure#0}, ()>
             at /rustc/a92413ef71861b452527dbb557b8fe39515d974e/src/tools/opt-dist/src/timer.rs:111:22
             at /rustc/a92413ef71861b452527dbb557b8fe39515d974e/src/tools/opt-dist/src/main.rs:214:9
             at /rustc/a92413ef71861b452527dbb557b8fe39515d974e/src/tools/opt-dist/src/main.rs:214:9
   6: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}, opt_dist::training::RustcPGOProfile>
             at /rustc/a92413ef71861b452527dbb557b8fe39515d974e/src/tools/opt-dist/src/timer.rs:111:22
             at /rustc/a92413ef71861b452527dbb557b8fe39515d974e/src/tools/opt-dist/src/main.rs:211:29
   8: opt_dist::main
             at /rustc/a92413ef71861b452527dbb557b8fe39515d974e/src/tools/opt-dist/src/main.rs:401:18
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/08328a323ecd80b443a8fcc72c6b1071f48e233f/library/core/src/ops/function.rs:250:5
  10: std::sys::backtrace::__rust_begin_short_backtrace::<fn() -> core::result::Result<(), anyhow::Error>, core::result::Result<(), anyhow::Error>>
             at /rustc/08328a323ecd80b443a8fcc72c6b1071f48e233f/library/std/src/sys/backtrace.rs:152:18
  11: std::rt::lang_start::<core::result::Result<(), anyhow::Error>>::{closure#0}
             at /rustc/08328a323ecd80b443a8fcc72c6b1071f48e233f/library/std/src/rt.rs:162:18
  12: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
  13: std::panicking::try::do_call
             at /rustc/08328a323ecd80b443a8fcc72c6b1071f48e233f/library/std/src/panicking.rs:557:40
  14: std::panicking::try
             at /rustc/08328a323ecd80b443a8fcc72c6b1071f48e233f/library/std/src/panicking.rs:521:19

rust-log-analyzer avatar Aug 02 '24 16:08 rust-log-analyzer

:broken_heart: Test failed - checks-actions

bors avatar Aug 02 '24 16:08 bors

@bors try @rust-timer queue

compiler-errors avatar Aug 02 '24 16:08 compiler-errors

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

rust-timer avatar Aug 02 '24 16:08 rust-timer

:hourglass: Trying commit cc28b640a23772223cce4c8dc2693a54ed33a00b with merge 45d774f7097c92ce2c4357e7cbdded60ba0b91f6...

bors avatar Aug 02 '24 16:08 bors

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

Click to see the possible cause of the failure (guessed by this bot)
------
 > importing cache manifest from ghcr.io/rust-lang/rust-ci-cache:3aacb9c90579defe09351ac5e8ee504359f8054da6326ff19038f1b7c90e3cb2aafe33685c6d9b76ee8d2ccbd187ca80c46ab5380485abdd8c0ce7d69cd8d8fd:
------
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-17]
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-17', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-17/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
To only update this specific test, also pass `--test-args lint/unused/lint-unused-variables.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/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/lint/unused/lint-unused-variables.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/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(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/x86_64-unknown-linux-gnu/test/ui/lint/unused/lint-unused-variables" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/lint/unused/lint-unused-variables/auxiliary" "--cfg" "something" "--edition=2018"
--- stderr -------------------------------
error: unused variable: `a`
##[error]  --> /checkout/tests/ui/lint/unused/lint-unused-variables.rs:8:5
   |
---

---- [ui] tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs stdout ----
diff of stderr:

16 LL |         #[cfg(something)] a: i32,
17    |                           ^ help: if this is intentional, prefix it with an underscore: `_a`
+ error: unused variable: `a`
+   --> $DIR/param-attrs-cfg.rs:107:27
+    |
+    |
+ LL |         #[cfg(something)] a: i32,
+    |                           ^ help: if this is intentional, prefix it with an underscore: `_a`
19 error: unused variable: `b`
20   --> $DIR/param-attrs-cfg.rs:30:23
21    |


99    |
100 LL |         #[cfg_attr(nothing, cfg(nothing))] c: i32,
101    |                                            ^ help: if this is intentional, prefix it with an underscore: `_c`
- error: unused variable: `a`
-   --> $DIR/param-attrs-cfg.rs:107:27
-    |
-    |
- LL |         #[cfg(something)] a: i32,
-    |                           ^ help: if this is intentional, prefix it with an underscore: `_a`
109 error: unused variable: `b`
110   --> $DIR/param-attrs-cfg.rs:113:27



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg/param-attrs-cfg.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args rfcs/rfc-2565-param-attrs/param-attrs-cfg.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/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.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/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(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/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg/auxiliary" "--cfg" "something" "--check-cfg=cfg(nothing,something)" "--edition=2018"
--- stderr -------------------------------
error: unused variable: `a`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:24:23
   |
   |
LL |     #[cfg(something)] a: i32,
   |                       ^ help: if this is intentional, prefix it with an underscore: `_a`
note: the lint level is defined here
  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:5:9
   |
LL | #![deny(unused_variables)]
LL | #![deny(unused_variables)]
   |         ^^^^^^^^^^^^^^^^

error: unused variable: `a`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:41:27
   |
LL |         #[cfg(something)] a: i32,
   |                           ^ help: if this is intentional, prefix it with an underscore: `_a`
error: unused variable: `a`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:107:27
   |
   |
LL |         #[cfg(something)] a: i32,
   |                           ^ help: if this is intentional, prefix it with an underscore: `_a`
error: unused variable: `b`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:30:23
   |
   |
LL |     #[cfg(something)] b: i32,
   |                       ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `c`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:32:40
   |
   |
LL |     #[cfg_attr(nothing, cfg(nothing))] c: i32,
   |                                        ^ help: if this is intentional, prefix it with an underscore: `_c`
error: unused variable: `b`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:48:27
   |
   |
LL |         #[cfg(something)] b: i32,
   |                           ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `c`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:50:44
   |
   |
LL |         #[cfg_attr(nothing, cfg(nothing))] c: i32,
   |                                            ^ help: if this is intentional, prefix it with an underscore: `_c`
error: unused variable: `b`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:56:27
   |
   |
LL |         #[cfg(something)] b: i32,
   |                           ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `c`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:58:44
   |
   |
LL |         #[cfg_attr(nothing, cfg(nothing))] c: i32,
   |                                            ^ help: if this is intentional, prefix it with an underscore: `_c`
error: unused variable: `b`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:67:27
   |
   |
LL |         #[cfg(something)] b: i32,
   |                           ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `c`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:69:44
   |
   |
LL |         #[cfg_attr(nothing, cfg(nothing))] c: i32,
   |                                            ^ help: if this is intentional, prefix it with an underscore: `_c`
error: unused variable: `b`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:75:27
   |
   |
LL |         #[cfg(something)] b: i32,
   |                           ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `c`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:77:44
   |
   |
LL |         #[cfg_attr(nothing, cfg(nothing))] c: i32,
   |                                            ^ help: if this is intentional, prefix it with an underscore: `_c`
error: unused variable: `b`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:86:27
   |
   |
LL |         #[cfg(something)] b: i32,
   |                           ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `c`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:88:44
   |
   |
LL |         #[cfg_attr(nothing, cfg(nothing))] c: i32,
   |                                            ^ help: if this is intentional, prefix it with an underscore: `_c`
error: unused variable: `b`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:94:27
   |
   |
LL |         #[cfg(something)] b: i32,
   |                           ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `c`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:96:44
   |
   |
LL |         #[cfg_attr(nothing, cfg(nothing))] c: i32,
   |                                            ^ help: if this is intentional, prefix it with an underscore: `_c`
error: unused variable: `b`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:113:27
   |
   |
LL |         #[cfg(something)] b: i32,
   |                           ^ help: if this is intentional, prefix it with an underscore: `_b`
error: unused variable: `c`
##[error]  --> /checkout/tests/ui/rfcs/rfc-2565-param-attrs/param-attrs-cfg.rs:115:44
   |
   |
LL |         #[cfg_attr(nothing, cfg(nothing))] c: i32,
   |                                            ^ help: if this is intentional, prefix it with an underscore: `_c`
error: aborting due to 19 previous errors
------------------------------------------


rust-log-analyzer avatar Aug 02 '24 16:08 rust-log-analyzer

:sunny: Try build successful - checks-actions Build commit: 45d774f7097c92ce2c4357e7cbdded60ba0b91f6 (45d774f7097c92ce2c4357e7cbdded60ba0b91f6)

bors avatar Aug 02 '24 18:08 bors

Queued 45d774f7097c92ce2c4357e7cbdded60ba0b91f6 with parent 53676730146e38e4697b6204c2ee61a9fd6b7e51, future comparison URL. There are currently 3 preceding artifacts in the queue. It will probably take at least ~4.2 hours until the benchmark run finishes.

rust-timer avatar Aug 02 '24 18:08 rust-timer

Finished benchmarking commit (45d774f7097c92ce2c4357e7cbdded60ba0b91f6): comparison URL.

Overall result: ❌ regressions - 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.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

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

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.4% [0.2%, 0.9%] 81
Regressions ❌
(secondary)
0.6% [0.2%, 1.1%] 25
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [0.2%, 0.9%] 81

Max RSS (memory usage)

Results (primary 4.8%, secondary 8.6%)

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)
4.8% [0.6%, 16.8%] 7
Regressions ❌
(secondary)
8.6% [6.7%, 12.1%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.8% [0.6%, 16.8%] 7

Cycles

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

Binary size

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

Bootstrap: 759.288s -> 759.848s (0.07%) Artifact size: 336.86 MiB -> 337.05 MiB (0.05%)

rust-timer avatar Aug 02 '24 23:08 rust-timer

@bors try @rust-timer queue

compiler-errors avatar Aug 03 '24 00:08 compiler-errors

Some changes occurred in compiler/rustc_sanitizers

cc @rust-lang/project-exploit-mitigations, @rcvalle

rustbot avatar Aug 03 '24 00:08 rustbot

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

rust-timer avatar Aug 03 '24 00:08 rust-timer

:hourglass: Trying commit c655c93f421dd70e432aeb4fa5a47d483457f1eb with merge 009eefe6e73bb82ab4a383fed2c0e448cf62418a...

bors avatar Aug 03 '24 00:08 bors

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#16 2.685 Building wheels for collected packages: reuse
#16 2.686   Building wheel for reuse (pyproject.toml): started
#16 2.931   Building wheel for reuse (pyproject.toml): finished with status 'done'
#16 2.931   Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132715 sha256=dfa09868353292d98f811d3efdb0d54d07389e808efc71d68e3b93c514bf8bec
#16 2.932   Stored in directory: /tmp/pip-ephem-wheel-cache-s1dv_l6p/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#16 2.934 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#16 3.326 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#16 3.326 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#16 DONE 3.4s
---
    Checking rustdoc-json-types v0.1.0 (/checkout/src/rustdoc-json-types)
   Compiling rinja_derive v0.2.0
    Checking rinja v0.2.0
    Checking rustdoc v0.0.0 (/checkout/src/librustdoc)
error[E0004]: non-exhaustive patterns: `DefKind::SyntheticMirBody` not covered
    |
124 |         match kind {
124 |         match kind {
    |               ^^^^ pattern `DefKind::SyntheticMirBody` not covered
note: `DefKind` defined here
   --> /checkout/compiler/rustc_hir/src/def.rs:52:1
    |
52  | pub enum DefKind {
52  | pub enum DefKind {
    | ^^^^^^^^^^^^^^^^
...
136 |     SyntheticMirBody,
    |     ---------------- not covered
    = note: the matched value is of type `DefKind`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
165 ~             | DefKind::Closure => Self::ForeignType,
165 ~             | DefKind::Closure => Self::ForeignType,
166 ~             DefKind::SyntheticMirBody => todo!(),


error[E0004]: non-exhaustive patterns: `DefKind::SyntheticMirBody` not covered
     |
1908 |                         match kind {
1908 |                         match kind {
     |                               ^^^^ pattern `DefKind::SyntheticMirBody` not covered
note: `DefKind` defined here
    --> /checkout/compiler/rustc_hir/src/def.rs:52:1
     |
52   | pub enum DefKind {
52   | pub enum DefKind {
     | ^^^^^^^^^^^^^^^^
...
136  |     SyntheticMirBody,
     |     ---------------- not covered
     = note: the matched value is of type `DefKind`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
     |
1953 ~                             Impl { .. } | GlobalAsm => unreachable!("not a path"),
1954 ~                             DefKind::SyntheticMirBody => todo!(),

For more information about this error, try `rustc --explain E0004`.
error: could not compile `rustdoc` (lib) due to 2 previous errors
Build completed unsuccessfully in 0:02:16

rust-log-analyzer avatar Aug 03 '24 00:08 rust-log-analyzer