Skip to content

Desugar async blocks in HIR instead of MIR#157309

Draft
cjgillot wants to merge 14 commits into
rust-lang:mainfrom
cjgillot:coroutine-hir-desugar
Draft

Desugar async blocks in HIR instead of MIR#157309
cjgillot wants to merge 14 commits into
rust-lang:mainfrom
cjgillot:coroutine-hir-desugar

Conversation

@cjgillot
Copy link
Copy Markdown
Contributor

@cjgillot cjgillot commented Jun 2, 2026

Implements MCP rust-lang/compiler-team#997
Based on #157166

In the current implementation, gen/async/async gen blocks and closures have type Coroutine(..) and CoroutineClosure(..). Those types implement Iterator, Future or AsyncIterator depending on the initial desugaring.

This creates a lot of complexity:

  • trait solvers must check which kind of coroutine each time;
  • MIR StateTransform needs to fixup types depending on the coroutine kind.

I propose to change the desugaring for coroutines to:

  • gen { .. } becomes CoroutineIterator::from_coroutine(#[coroutine] { .. });
  • async { .. } becomes CoroutineFuture::from_coroutine(#[coroutine] { .. });
  • async gen { .. } becomes CoroutineAsyncIterator::from_coroutine(#[coroutine] { .. }).

This way, all coroutines implement std::ops::Coroutine and core is responsible for translating this to user-friendly traits. All the complexity is pushed to error-reporting code, which is not soundness-critical.

Coroutine closures are a little more complex, as we need to keep the CoroutineClosure type for borrow-checking.

Main design point: I create two methods on TyCtxt that are meant to do the back-and-forth between wrapped and unwrapped coroutines. coroutine_desugared_type wraps a coroutine inside the adapter struct. try_unwrap_desugared_coroutine unwraps it.

r? @oli-obk
cc @lcnr @RalfJung
cc @estebank as I modify quite a lot of diagnostic code

cjgillot added 12 commits June 1, 2026 21:36
Debug-printing MIR is not readable. We have dedicated infra to dump MIR,
use it.

Added benefit, this avoid hardcoding that `AddMovesForPackedDrops` is the
first pass in make_shim (it is not).
Closures, coroutines, coroutine witnesses and coroutine closures use the
same syntax. This used to be copy-paste but gradually departed.
@rustbot rustbot added PG-exploit-mitigations Project group: Exploit mitigations 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jun 2, 2026
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Jun 2, 2026
@Noratrieb
Copy link
Copy Markdown
Member

cc @Swatinem as you have done work on this in the past

@cjgillot cjgillot force-pushed the coroutine-hir-desugar branch from 3aee865 to d17eeb1 Compare June 2, 2026 15:13
@cjgillot
Copy link
Copy Markdown
Contributor Author

cjgillot commented Jun 2, 2026

@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 Jun 2, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 2, 2026
Desugar async blocks in HIR instead of MIR
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
tests/ui/should_impl_trait/method_list_1.rs (revision `edition2021`) ... ok
tests/ui/crashes/third-party/conf_allowlisted.rs ... ok

FAILED TEST: tests/ui/large_futures.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/0/tests/ui" "tests/ui/large_futures.rs" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rmeta" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rmeta" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rlib" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rmeta" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rlib" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rmeta" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rmeta" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rmeta" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rmeta" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rlib" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rmeta" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rmeta" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/debug/deps" "--edition" "2024"

error: diagnostic code `clippy::large_futures` not found on line 64
##[error]  --> tests/ui/large_futures.rs:65:22
   |
65 |                 //~^ large_futures
   |                      ^^^^^^^^^^^^^ expected because of this pattern
   |

error: there was 1 unmatched diagnostic
##[error]  --> tests/ui/large_futures.rs:72:5
   |
72 |     macro_!().await
   |     ^^^^^^^^^ Error[clippy::large_futures]: large future with a size of 65540 bytes
   |

full stderr:
error: large future with a size of 16385 bytes
##[error]  --> tests/ui/large_futures.rs:13:9
   |
LL |         big_fut([0u8; 1024 * 16]).await;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Box::pin` on it: `Box::pin(big_fut([0u8; 1024 * 16]))`
   |
   = note: `-D clippy::large-futures` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::large_futures)]`

error: large future with a size of 16386 bytes
##[error]  --> tests/ui/large_futures.rs:16:5
   |
LL |     f.await
   |     ^ help: consider `Box::pin` on it: `Box::pin(f)`

error: large future with a size of 16387 bytes
##[error]  --> tests/ui/large_futures.rs:21:9
   |
LL |         wait().await;
   |         ^^^^^^ help: consider `Box::pin` on it: `Box::pin(wait())`

error: large future with a size of 16387 bytes
##[error]  --> tests/ui/large_futures.rs:27:13
   |
LL |             wait().await;
   |             ^^^^^^ help: consider `Box::pin` on it: `Box::pin(wait())`

error: large future with a size of 65540 bytes
##[error]  --> tests/ui/large_futures.rs:35:5
   |
LL |     foo().await;
   |     ^^^^^ help: consider `Box::pin` on it: `Box::pin(foo())`

error: large future with a size of 49159 bytes
##[error]  --> tests/ui/large_futures.rs:38:5
   |
LL |     calls_fut(fut).await;
   |     ^^^^^^^^^^^^^^ help: consider `Box::pin` on it: `Box::pin(calls_fut(fut))`

error: large future with a size of 65540 bytes
##[error]  --> tests/ui/large_futures.rs:51:5
   |
LL | /     async {
LL | |
LL | |
LL | |         let x = [0i32; 1024 * 16];
LL | |         async {}.await;
LL | |         println!("{:?}", x);
LL | |     }
   | |_____^
   |
help: consider `Box::pin` on it
   |
LL ~     Box::pin(async {
LL +
LL + 
LL +         let x = [0i32; 1024 * 16];
LL +         async {}.await;
LL +         println!("{:?}", x);
LL +     })
   |

error: large future with a size of 65540 bytes
##[error]  --> tests/ui/large_futures.rs:64:13
   |
LL | /             async {
LL | |
LL | |                 let x = [0i32; 1024 * 16];
LL | |                 async {}.await;
LL | |                 println!("macro: {:?}", x);
LL | |             }
   | |_____________^
...
LL |       macro_!().await
   |       --------- in this macro invocation
   |
   = note: this error originates in the macro `macro_` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider `Box::pin` on it
   |
LL ~             Box::pin(async {
LL +
LL +                 let x = [0i32; 1024 * 16];
LL +                 async {}.await;
LL +                 println!("macro: {:?}", x);
LL +             })
   |

error: aborting due to 8 previous errors


full stdout:



FAILED TEST: tests/ui/redundant_async_block.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/0/tests/ui" "tests/ui/redundant_async_block.rs" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rmeta" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rmeta" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rlib" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rmeta" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rlib" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rmeta" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rmeta" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rmeta" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rmeta" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rlib" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rmeta" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rmeta" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/debug/deps" "--edition" "2024"

error: no output was emitted
Execute `./x test src/tools/clippy --bless` to remove `tests/ui/redundant_async_block.stderr`

error: diagnostic code `clippy::redundant_async_block` not found on line 13
---



FAILED TEST: tests/ui/redundant_closure_call_fixable.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/0/tests/ui" "tests/ui/redundant_closure_call_fixable.rs" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rmeta" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rmeta" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rlib" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rmeta" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rlib" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rmeta" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rmeta" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rmeta" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rmeta" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rlib" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rmeta" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rmeta" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/debug/deps" "--edition" "2024"

error: actual output differed from expected
Execute `./x test src/tools/clippy --bless` to update `tests/ui/redundant_closure_call_fixable.stderr` to the actual output
--- tests/ui/redundant_closure_call_fixable.stderr
+++ <stderr output>
---
 LL +
 LL +         let x = something().await;
... 29 lines skipped ...
    |
 LL |     let d = (async || something().await)();
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `async { something().await }`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `something().await`
 
 error: try not to call a closure in the expression where it is declared
... 41 lines skipped ...
    |
 LL |     let a = (|| || || || async || 1)()()()()();
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `async { 1 }`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `1`
 
 error: try not to call a closure in the expression where it is declared
... 65 lines skipped ...
 error: aborting due to 21 previous errors
 

Full unnormalized output:
error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:15:13
   |
LL |     let a = (|| 42)();
   |             ^^^^^^^^^ help: try doing something like: `42`
   |
   = note: `-D clippy::redundant-closure-call` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::redundant_closure_call)]`

error: try not to call a closure in the expression where it is declared
---

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:29:13
   |
LL |     let d = (async || something().await)();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `something().await`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:39:13
   |
LL |             (|| m!())()
   |             ^^^^^^^^^^^ help: try doing something like: `m!()`
...
LL |     m2!();
   |     ----- in this macro invocation
   |
   = note: this error originates in the macro `m2` (in Nightly builds, run with -Z macro-backtrace for more info)

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:34:13
   |
LL |             (|| 0)()
   |             ^^^^^^^^ help: try doing something like: `0`
...
LL |     m2!();
   |     ----- in this macro invocation
   |
   = note: this error originates in the macro `m` which comes from the expansion of the macro `m2` (in Nightly builds, run with -Z macro-backtrace for more info)

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:49:16
   |
LL |     assert_eq!((|| || 43)()(), 42);
   |                ^^^^^^^^^^^^^^ help: try doing something like: `43`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:59:10
   |
LL |     dbg!((|| 42)());
   |          ^^^^^^^^^ help: try doing something like: `42`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:63:13
   |
LL |     let a = (|| || || 123)();
   |             ^^^^^^^^^^^^^^^^ help: try doing something like: `|| || 123`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:68:13
   |
LL |     let a = (|| || || || async || 1)()()()()();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `1`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:78:13
   |
LL |     let a = (|| echo!(|| echo!(|| 1)))()()();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `1`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:81:13
   |
LL |     let a = (|| echo!((|| 123)))()();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `123`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:95:11
   |
LL |     bar()((|| || 42)()(), 5);
   |           ^^^^^^^^^^^^^^ help: try doing something like: `42`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:97:9
   |
LL |     foo((|| || 42)()(), 5);
   |         ^^^^^^^^^^^^^^ help: try doing something like: `42`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:102:5
   |
LL |     (|| async {})().await;
   |     ^^^^^^^^^^^^^^^ help: try doing something like: `async {}`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:112:18
   |
LL |         spawn_on((|| async move {})());
   |                  ^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `async move {}`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:118:28
   |
LL |     std::convert::identity((|| 13_i32 + 36_i32)()).leading_zeros();
   |                            ^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `13_i32 + 36_i32`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:150:5
   |
LL |     (|| { Some(true) })() == Some(true);
   |     ^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `Some(true)`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:152:5
   |
LL |     (|| Some(true))() == Some(true);
   |     ^^^^^^^^^^^^^^^^^ help: try doing something like: `Some(true)`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:154:5
   |
LL |     (|| { Some(if 1 > 2 {1} else {2}) })() == Some(2);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `Some(if 1 > 2 {1} else {2})`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:156:5
   |
LL |     (|| { Some( 1 > 2 ) })() == Some(true);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `Some( 1 > 2 )`

error: aborting due to 21 previous errors



full stderr:
error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:15:13
   |
LL |     let a = (|| 42)();
   |             ^^^^^^^^^ help: try doing something like: `42`
   |
   = note: `-D clippy::redundant-closure-call` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::redundant_closure_call)]`

error: try not to call a closure in the expression where it is declared
---

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:29:13
   |
LL |     let d = (async || something().await)();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `something().await`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:39:13
   |
LL |             (|| m!())()
   |             ^^^^^^^^^^^ help: try doing something like: `m!()`
...
LL |     m2!();
   |     ----- in this macro invocation
   |
   = note: this error originates in the macro `m2` (in Nightly builds, run with -Z macro-backtrace for more info)

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:34:13
   |
LL |             (|| 0)()
   |             ^^^^^^^^ help: try doing something like: `0`
...
LL |     m2!();
   |     ----- in this macro invocation
   |
   = note: this error originates in the macro `m` which comes from the expansion of the macro `m2` (in Nightly builds, run with -Z macro-backtrace for more info)

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:49:16
   |
LL |     assert_eq!((|| || 43)()(), 42);
   |                ^^^^^^^^^^^^^^ help: try doing something like: `43`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:59:10
   |
LL |     dbg!((|| 42)());
   |          ^^^^^^^^^ help: try doing something like: `42`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:63:13
   |
LL |     let a = (|| || || 123)();
   |             ^^^^^^^^^^^^^^^^ help: try doing something like: `|| || 123`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:68:13
   |
LL |     let a = (|| || || || async || 1)()()()()();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `1`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:78:13
   |
LL |     let a = (|| echo!(|| echo!(|| 1)))()()();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `1`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:81:13
   |
LL |     let a = (|| echo!((|| 123)))()();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `123`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:95:11
   |
LL |     bar()((|| || 42)()(), 5);
   |           ^^^^^^^^^^^^^^ help: try doing something like: `42`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:97:9
   |
LL |     foo((|| || 42)()(), 5);
   |         ^^^^^^^^^^^^^^ help: try doing something like: `42`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:102:5
   |
LL |     (|| async {})().await;
   |     ^^^^^^^^^^^^^^^ help: try doing something like: `async {}`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:112:18
   |
LL |         spawn_on((|| async move {})());
   |                  ^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `async move {}`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:118:28
   |
LL |     std::convert::identity((|| 13_i32 + 36_i32)()).leading_zeros();
   |                            ^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `13_i32 + 36_i32`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:150:5
   |
LL |     (|| { Some(true) })() == Some(true);
   |     ^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `Some(true)`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:152:5
   |
LL |     (|| Some(true))() == Some(true);
   |     ^^^^^^^^^^^^^^^^^ help: try doing something like: `Some(true)`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:154:5
   |
LL |     (|| { Some(if 1 > 2 {1} else {2}) })() == Some(2);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `Some(if 1 > 2 {1} else {2})`

error: try not to call a closure in the expression where it is declared
##[error]  --> tests/ui/redundant_closure_call_fixable.rs:156:5
   |
LL |     (|| { Some( 1 > 2 ) })() == Some(true);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `Some( 1 > 2 )`

error: aborting due to 21 previous errors


full stdout:



FAILED TEST: tests/ui/unused_async_trait_impl_no_std.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--crate-type=lib" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/0/tests/ui" "tests/ui/unused_async_trait_impl_no_std.rs" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rmeta" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rmeta" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rlib" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rmeta" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rlib" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rmeta" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rmeta" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rmeta" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rmeta" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rlib" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rmeta" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rmeta" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/debug/deps" "--edition" "2024"

error: no output was emitted
Execute `./x test src/tools/clippy --bless` to remove `tests/ui/unused_async_trait_impl_no_std.stderr`

error: diagnostic code `clippy::unused_async_trait_impl` not found on line 11
---



FAILED TEST: tests/ui/unused_async_trait_impl.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--crate-type=lib" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/0/tests/ui" "tests/ui/unused_async_trait_impl.rs" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rmeta" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rmeta" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rlib" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rmeta" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rlib" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rmeta" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rmeta" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rmeta" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rmeta" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rlib" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rmeta" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rmeta" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/debug/deps" "--edition" "2024"

error: no output was emitted
Execute `./x test src/tools/clippy --bless` to remove `tests/ui/unused_async_trait_impl.stderr`

error: diagnostic code `clippy::unused_async_trait_impl` not found on line 16
---



FAILED TEST: tests/ui/unused_async.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/0/tests/ui" "tests/ui/unused_async.rs" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rmeta" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rmeta" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rlib" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rmeta" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rlib" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rmeta" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rmeta" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rmeta" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rmeta" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rlib" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rmeta" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rmeta" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/debug/deps" "--edition" "2024"

error: actual output differed from expected
Execute `./x test src/tools/clippy --bless` to update `tests/ui/unused_async.stderr` to the actual output
--- tests/ui/unused_async.stderr
+++ <stderr output>
---
-error: aborting due to 4 previous errors
+error: unused `async` for function with no await statements
+  --> tests/ui/unused_async.rs:129:5
+   |
+LL | /     async fn todo_task() -> Result<(), String> {
+LL | |         todo!("Implement task");
+LL | |     }
+   | |_____^
+   |
+   = help: consider removing the `async` from this function
 
---
+
+error: unused `async` for function with no await statements
+  --> tests/ui/unused_async.rs:139:5
+   |
+LL | /     async fn todo_task(_arg: i32) {
+LL | |         todo!()
+LL | |     }
+   | |_____^
+   |
+   = help: consider removing the `async` from this function
+
---

error: unused `async` for function with no await statements
##[error]  --> tests/ui/unused_async.rs:129:5
   |
LL | /     async fn todo_task() -> Result<(), String> {
LL | |         todo!("Implement task");
LL | |     }
   | |_____^
   |
   = help: consider removing the `async` from this function

---

error: unused `async` for function with no await statements
##[error]  --> tests/ui/unused_async.rs:139:5
   |
LL | /     async fn todo_task(_arg: i32) {
LL | |         todo!()
LL | |     }
   | |_____^
   |
   = help: consider removing the `async` from this function

---

error: there was 1 unmatched diagnostic
##[error]   --> tests/ui/unused_async.rs:129:5
    |
129 | /     async fn todo_task() -> Result<(), String> {
130 | |         todo!("Implement task");
131 | |     }
    | |_____^ Error[clippy::unused_async]: unused `async` for function with no await statements
    |

error: there was 1 unmatched diagnostic
##[error]   --> tests/ui/unused_async.rs:133:5
    |
133 | /     async fn unimplemented_task() -> Result<(), String> {
134 | |         unimplemented!("Implement task");
135 | |     }
    | |_____^ Error[clippy::unused_async]: unused `async` for function with no await statements
    |

error: there was 1 unmatched diagnostic
##[error]   --> tests/ui/unused_async.rs:139:5
    |
139 | /     async fn todo_task(_arg: i32) {
140 | |         todo!()
141 | |     }
    | |_____^ Error[clippy::unused_async]: unused `async` for function with no await statements
    |

error: there was 1 unmatched diagnostic
##[error]   --> tests/ui/unused_async.rs:143:5
    |
143 | /     async fn unimplemented_task(_arg: i32) {
144 | |         let a = 1;
145 | |         unimplemented!()
146 | |     }
    | |_____^ Error[clippy::unused_async]: unused `async` for function with no await statements
    |

full stderr:
error: unused `async` for function with no await statements
##[error]  --> tests/ui/unused_async.rs:12:5
---

error: unused `async` for function with no await statements
##[error]  --> tests/ui/unused_async.rs:129:5
   |
LL | /     async fn todo_task() -> Result<(), String> {
LL | |         todo!("Implement task");
LL | |     }
   | |_____^
   |
   = help: consider removing the `async` from this function

---

error: unused `async` for function with no await statements
##[error]  --> tests/ui/unused_async.rs:139:5
   |
LL | /     async fn todo_task(_arg: i32) {
LL | |         todo!()
LL | |     }
   | |_____^
   |
   = help: consider removing the `async` from this function

---



FAILED TEST: tests/ui/author/blocks.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/0/tests/ui/author" "tests/ui/author/blocks.rs" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rmeta" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rmeta" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rlib" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rmeta" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rlib" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rmeta" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rmeta" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rmeta" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rmeta" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rlib" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rmeta" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rmeta" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/debug/deps" "--edition" "2018"

error: actual output differed from expected
Execute `./x test src/tools/clippy --bless` to update `tests/ui/author/blocks.stdout` to the actual output
--- tests/ui/author/blocks.stdout
+++ <stdout output>
 if let ExprKind::Block(block, None) = expr.kind
     && block.stmts.len() == 3
... 35 lines skipped ...
     && let FnRetTy::DefaultReturn(_) = fn_decl.output
     && expr1 = &cx.tcx.hir_body(body_id).value
-    && let ExprKind::Closure { capture_clause: CaptureBy::Ref, fn_decl: fn_decl1, body: body_id1, closure_kind: ClosureKind::Coroutine(CoroutineKind::Desugared(CoroutineDesugaring::Async, CoroutineSource::Closure)), .. } = expr1.kind
+    && let ExprKind::Call(func, args) = expr1.kind
+    && func.res(cx).is_lang_item(cx, LangItem::future_from_coroutine
+    && args.len() == 1
+    && let ExprKind::Closure { capture_clause: CaptureBy::Ref, fn_decl: fn_decl1, body: body_id1, closure_kind: ClosureKind::Coroutine(CoroutineKind::Desugared(CoroutineDesugaring::Async, CoroutineSource::Closure)), .. } = args[0].kind
     && let FnRetTy::DefaultReturn(_) = fn_decl1.output
     && expr2 = &cx.tcx.hir_body(body_id1).value
... 8 lines skipped ...
     // report your lint here
 }

Full unnormalized output:
if let ExprKind::Block(block, None) = expr.kind
    && block.stmts.len() == 3
    && let StmtKind::Let(local) = block.stmts[0].kind
    && let Some(init) = local.init
    && let ExprKind::Lit(ref lit) = init.kind
    && let LitKind::Int(42, LitIntType::Signed(IntTy::I32)) = lit.node
    && let PatKind::Binding(BindingMode::NONE, _, name, None) = local.pat.kind
    && name.as_str() == "x"
    && let StmtKind::Let(local1) = block.stmts[1].kind
    && let Some(init1) = local1.init
    && let ExprKind::Lit(ref lit1) = init1.kind
    && let LitKind::Float(_, LitFloatType::Suffixed(FloatTy::F32)) = lit1.node
    && let PatKind::Binding(BindingMode::NONE, _, name1, None) = local1.pat.kind
    && name1.as_str() == "_t"
    && let StmtKind::Semi(e) = block.stmts[2].kind
    && let ExprKind::Unary(UnOp::Neg, inner) = e.kind
    && block.expr.is_none()
{
    // report your lint here
}
if let ExprKind::Block(block, None) = expr.kind
    && block.stmts.len() == 1
    && let StmtKind::Let(local) = block.stmts[0].kind
    && let Some(init) = local.init
    && let ExprKind::Call(func, args) = init.kind
    && func.res(cx).is_diag_item(cx, sym::string_new)
    && args.is_empty()
    && let PatKind::Binding(BindingMode::NONE, _, name, None) = local.pat.kind
    && name.as_str() == "expr"
    && let Some(trailing_expr) = block.expr
    && let ExprKind::Call(func1, args1) = trailing_expr.kind
    && func1.res(cx).is_diag_item(cx, sym::mem_drop)
    && args1.len() == 1
{
    // report your lint here
}
if let ExprKind::Closure { capture_clause: CaptureBy::Value { .. }, fn_decl: fn_decl, body: body_id, closure_kind: ClosureKind::CoroutineClosure(CoroutineDesugaring::Async), .. } = expr.kind
    && let FnRetTy::DefaultReturn(_) = fn_decl.output
    && expr1 = &cx.tcx.hir_body(body_id).value
    && let ExprKind::Call(func, args) = expr1.kind
    && func.res(cx).is_lang_item(cx, LangItem::future_from_coroutine
    && args.len() == 1
    && let ExprKind::Closure { capture_clause: CaptureBy::Ref, fn_decl: fn_decl1, body: body_id1, closure_kind: ClosureKind::Coroutine(CoroutineKind::Desugared(CoroutineDesugaring::Async, CoroutineSource::Closure)), .. } = args[0].kind
    && let FnRetTy::DefaultReturn(_) = fn_decl1.output
    && expr2 = &cx.tcx.hir_body(body_id1).value
    && let ExprKind::Block(block, None) = expr2.kind
    && block.stmts.is_empty()
    && let Some(trailing_expr) = block.expr
    && let ExprKind::DropTemps(expr3) = trailing_expr.kind
    && let ExprKind::Block(block1, None) = expr3.kind
    && block1.stmts.is_empty()
    && block1.expr.is_none()
{
    // report your lint here
}


full stderr:

full stdout:
if let ExprKind::Block(block, None) = expr.kind
    && block.stmts.len() == 3
    && let StmtKind::Let(local) = block.stmts[0].kind
    && let Some(init) = local.init
    && let ExprKind::Lit(ref lit) = init.kind
    && let LitKind::Int(42, LitIntType::Signed(IntTy::I32)) = lit.node
    && let PatKind::Binding(BindingMode::NONE, _, name, None) = local.pat.kind
    && name.as_str() == "x"
    && let StmtKind::Let(local1) = block.stmts[1].kind
    && let Some(init1) = local1.init
    && let ExprKind::Lit(ref lit1) = init1.kind
    && let LitKind::Float(_, LitFloatType::Suffixed(FloatTy::F32)) = lit1.node
    && let PatKind::Binding(BindingMode::NONE, _, name1, None) = local1.pat.kind
    && name1.as_str() == "_t"
    && let StmtKind::Semi(e) = block.stmts[2].kind
    && let ExprKind::Unary(UnOp::Neg, inner) = e.kind
    && block.expr.is_none()
{
    // report your lint here
}
if let ExprKind::Block(block, None) = expr.kind
    && block.stmts.len() == 1
    && let StmtKind::Let(local) = block.stmts[0].kind
    && let Some(init) = local.init
    && let ExprKind::Call(func, args) = init.kind
    && func.res(cx).is_diag_item(cx, sym::string_new)
    && args.is_empty()
    && let PatKind::Binding(BindingMode::NONE, _, name, None) = local.pat.kind
    && name.as_str() == "expr"
    && let Some(trailing_expr) = block.expr
    && let ExprKind::Call(func1, args1) = trailing_expr.kind
    && func1.res(cx).is_diag_item(cx, sym::mem_drop)
    && args1.len() == 1
{
    // report your lint here
}
if let ExprKind::Closure { capture_clause: CaptureBy::Value { .. }, fn_decl: fn_decl, body: body_id, closure_kind: ClosureKind::CoroutineClosure(CoroutineDesugaring::Async), .. } = expr.kind
    && let FnRetTy::DefaultReturn(_) = fn_decl.output
    && expr1 = &cx.tcx.hir_body(body_id).value
    && let ExprKind::Call(func, args) = expr1.kind
    && func.res(cx).is_lang_item(cx, LangItem::future_from_coroutine
    && args.len() == 1
    && let ExprKind::Closure { capture_clause: CaptureBy::Ref, fn_decl: fn_decl1, body: body_id1, closure_kind: ClosureKind::Coroutine(CoroutineKind::Desugared(CoroutineDesugaring::Async, CoroutineSource::Closure)), .. } = args[0].kind
    && let FnRetTy::DefaultReturn(_) = fn_decl1.output
    && expr2 = &cx.tcx.hir_body(body_id1).value
    && let ExprKind::Block(block, None) = expr2.kind
    && block.stmts.is_empty()
    && let Some(trailing_expr) = block.expr
    && let ExprKind::DropTemps(expr3) = trailing_expr.kind
    && let ExprKind::Block(block1, None) = expr3.kind
    && block1.stmts.is_empty()
    && block1.expr.is_none()
{
    // report your lint here
}



FAILED TEST: tests/ui/dbg_macro/dbg_macro.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--test" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/0/tests/ui/dbg_macro" "tests/ui/dbg_macro/dbg_macro.rs" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rlib" "--extern" "futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libfutures-fd8ed12b545b74f6.rmeta" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rlib" "--extern" "itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libitertools-9ee748436348a571.rmeta" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rlib" "--extern" "libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/liblibc-90619423ebd55afe.rmeta" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rlib" "--extern" "parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-4abb836a6bc2821a.rmeta" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rlib" "--extern" "quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libquote-4a574c8d844a6f29.rmeta" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rlib" "--extern" "regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libregex-570f05d19c36606e.rmeta" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rlib" "--extern" "serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libserde-efd3fc3f0a62fb24.rmeta" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rlib" "--extern" "syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libsyn-287a95c1501d5684.rmeta" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rlib" "--extern" "tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps/libtokio-29d18ec391c258da.rmeta" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/debug/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/debug/deps" "--edition" "2024"

error: actual output differed from expected
Execute `./x test src/tools/clippy --bless` to update `tests/ui/dbg_macro/dbg_macro.stderr` to the actual output
--- tests/ui/dbg_macro/dbg_macro.stderr
+++ <stderr output>
---
 
-error: the `dbg!` macro is intended as a debugging tool
-  --> tests/ui/dbg_macro/dbg_macro.rs:138:36
-   |
-LL |         takes_async_fn(async |val| dbg!(val));
-   |                                    ^^^^^^^^^
-   |
-help: remove the invocation before committing it to a version control system
-   |
-LL -         takes_async_fn(async |val| dbg!(val));
-LL +         takes_async_fn(async |val| val);
-   |
 
-error: aborting due to 20 previous errors
+thread 'rustc' (55972) panicked at src/tools/clippy/clippy_lints/src/dbg_macro.rs:121:34:
+internal error: entered unreachable code
+stack backtrace:
+   0: __rustc::rust_begin_unwind
+   1: core::panicking::panic_fmt
+   2: core::panicking::panic
+   3: <clippy_utils::diagnostics::span_lint_and_then::ClippyDiag<clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, &str, <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}> as rustc_errors::diagnostic::Diagnostic<()>>::into_diag
+   4: <rustc_middle::lint::emit_lint_base<clippy_utils::diagnostics::span_lint_and_then::ClippyDiag<clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, &str, <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}>, rustc_middle::lint::LevelSpec<rustc_lint_defs::StableLintExpectationId>>::{closure#0} as core::ops::function::FnOnce<(rustc_errors::DiagCtxtHandle, rustc_errors::Level)>>::call_once::{shim:vtable#0}
+   5: rustc_middle::lint::emit_lint_base::emit_lint_base_impl
+   6: rustc_middle::lint::emit_lint_base::<clippy_utils::diagnostics::span_lint_and_then::ClippyDiag<clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, &str, <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}>, rustc_middle::lint::LevelSpec<rustc_lint_defs::StableLintExpectationId>>
+   7: <rustc_lint::context::LateContext as rustc_lint::context::LintContext>::emit_span_lint::<rustc_error_messages::MultiSpan, clippy_utils::diagnostics::span_lint_and_then::ClippyDiag<clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, &str, <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}>>
+   8: clippy_utils::diagnostics::span_lint_and_then::<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, &str, <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr::{closure#0}>
+   9: <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr
+  10: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>::with_lint_attrs::<<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0}>
+  11: rustc_hir::intravisit::walk_body::<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>
+  12: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_nested_body
+  13: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_fn
+  14: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>
+  15: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>::with_lint_attrs::<<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0}>
+  16: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>
---
+  35: rustc_interface::passes::analysis::{closure#0}::{closure#0}
+  36: rustc_data_structures::sync::parallel::par_fns
+  37: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#0}>
+  38: rustc_interface::passes::analysis
+      [... omitted 1 frame ...]
+  39: std::panicking::catch_unwind::<core::option::Option<rustc_interface::queries::Linker>, core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>>
+  40: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
+  41: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}>
+  42: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
+  43: std::panicking::catch_unwind::<(), core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}::{closure#0}>>
+  44: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
+  45: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}, ()>
+note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---
Full unnormalized output:
error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:10:22
   |
LL |     if let Some(n) = dbg!(n.checked_sub(4)) { n } else { n }
   |                      ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D clippy::dbg-macro` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::dbg_macro)]`
help: remove the invocation before committing it to a version control system
   |
LL -     if let Some(n) = dbg!(n.checked_sub(4)) { n } else { n }
LL +     if let Some(n) = n.checked_sub(4) { n } else { n }
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:16:8
   |
LL |     if dbg!(n <= 1) {
   |        ^^^^^^^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -     if dbg!(n <= 1) {
LL +     if n <= 1 {
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:19:9
   |
---

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:22:9
   |
LL |         dbg!(n * factorial(n - 1))
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -         dbg!(n * factorial(n - 1))
LL +         n * factorial(n - 1)
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:28:5
   |
---

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:31:14
   |
LL |     foo(3) + dbg!(factorial(4));
   |              ^^^^^^^^^^^^^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -     foo(3) + dbg!(factorial(4));
LL +     foo(3) + factorial(4);
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:34:5
   |
LL |     dbg!(1, 2, 3, 4, 5);
   |     ^^^^^^^^^^^^^^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -     dbg!(1, 2, 3, 4, 5);
LL +     (1, 2, 3, 4, 5);
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:56:5
   |
---
   |             ^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -     let _ = dbg!();
LL +     let _ = ();
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:63:9
   |
LL |     bar(dbg!());
   |         ^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -     bar(dbg!());
LL +     bar(());
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:66:10
   |
LL |     foo!(dbg!());
   |          ^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -     foo!(dbg!());
LL +     foo!(());
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:69:16
   |
LL |     foo2!(foo!(dbg!()));
   |                ^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -     foo2!(foo!(dbg!()));
LL +     foo2!(foo!(()));
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:51:13
   |
LL |             dbg!();
   |             ^^^^^^
...
LL |     expand_to_dbg!();
   |     ---------------- in this macro invocation
   |
   = note: this error originates in the macro `expand_to_dbg` (in Nightly builds, run with -Z macro-backtrace for more info)
help: remove the invocation before committing it to a version control system
   |
LL -             dbg!();
   |

---

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:119:31
   |
LL |         println!("dbg: {:?}", dbg!(s));
   |                               ^^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -         println!("dbg: {:?}", dbg!(s));
LL +         println!("dbg: {:?}", s);
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:122:22
   |
LL |         print!("{}", dbg!(s));
   |                      ^^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -         print!("{}", dbg!(s));
LL +         print!("{}", s);
   |


thread 'rustc' (55972) panicked at src/tools/clippy/clippy_lints/src/dbg_macro.rs:121:34:
internal error: entered unreachable code
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: <clippy_utils::diagnostics::span_lint_and_then::ClippyDiag<clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, &str, <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}> as rustc_errors::diagnostic::Diagnostic<()>>::into_diag
   4: <rustc_middle::lint::emit_lint_base<clippy_utils::diagnostics::span_lint_and_then::ClippyDiag<clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, &str, <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}>, rustc_middle::lint::LevelSpec<rustc_lint_defs::StableLintExpectationId>>::{closure#0} as core::ops::function::FnOnce<(rustc_errors::DiagCtxtHandle, rustc_errors::Level)>>::call_once::{shim:vtable#0}
   5: rustc_middle::lint::emit_lint_base::emit_lint_base_impl
   6: rustc_middle::lint::emit_lint_base::<clippy_utils::diagnostics::span_lint_and_then::ClippyDiag<clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, &str, <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}>, rustc_middle::lint::LevelSpec<rustc_lint_defs::StableLintExpectationId>>
   7: <rustc_lint::context::LateContext as rustc_lint::context::LintContext>::emit_span_lint::<rustc_error_messages::MultiSpan, clippy_utils::diagnostics::span_lint_and_then::ClippyDiag<clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, &str, <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}>>
   8: clippy_utils::diagnostics::span_lint_and_then::<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, &str, <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr::{closure#0}>
   9: <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr
  10: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>::with_lint_attrs::<<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0}>
  11: rustc_hir::intravisit::walk_body::<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>
  12: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_nested_body
  13: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_fn
  14: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>
  15: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>::with_lint_attrs::<<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0}>
  16: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>
---
  35: rustc_interface::passes::analysis::{closure#0}::{closure#0}
  36: rustc_data_structures::sync::parallel::par_fns
  37: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#0}>
  38: rustc_interface::passes::analysis
      [... omitted 1 frame ...]
  39: std::panicking::catch_unwind::<core::option::Option<rustc_interface::queries::Linker>, core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>>
  40: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
  41: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}>
  42: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
  43: std::panicking::catch_unwind::<(), core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}::{closure#0}>>
  44: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
  45: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}, ()>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---
full stderr:
error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:10:22
   |
LL |     if let Some(n) = dbg!(n.checked_sub(4)) { n } else { n }
   |                      ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D clippy::dbg-macro` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::dbg_macro)]`
help: remove the invocation before committing it to a version control system
   |
LL -     if let Some(n) = dbg!(n.checked_sub(4)) { n } else { n }
LL +     if let Some(n) = n.checked_sub(4) { n } else { n }
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:16:8
   |
LL |     if dbg!(n <= 1) {
   |        ^^^^^^^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -     if dbg!(n <= 1) {
LL +     if n <= 1 {
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:19:9
   |
---

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:22:9
   |
LL |         dbg!(n * factorial(n - 1))
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -         dbg!(n * factorial(n - 1))
LL +         n * factorial(n - 1)
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:28:5
   |
---

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:31:14
   |
LL |     foo(3) + dbg!(factorial(4));
   |              ^^^^^^^^^^^^^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -     foo(3) + dbg!(factorial(4));
LL +     foo(3) + factorial(4);
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:34:5
   |
LL |     dbg!(1, 2, 3, 4, 5);
   |     ^^^^^^^^^^^^^^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -     dbg!(1, 2, 3, 4, 5);
LL +     (1, 2, 3, 4, 5);
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:56:5
   |
---
   |             ^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -     let _ = dbg!();
LL +     let _ = ();
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:63:9
   |
LL |     bar(dbg!());
   |         ^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -     bar(dbg!());
LL +     bar(());
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:66:10
   |
LL |     foo!(dbg!());
   |          ^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -     foo!(dbg!());
LL +     foo!(());
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:69:16
   |
LL |     foo2!(foo!(dbg!()));
   |                ^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -     foo2!(foo!(dbg!()));
LL +     foo2!(foo!(()));
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:51:13
   |
LL |             dbg!();
   |             ^^^^^^
...
LL |     expand_to_dbg!();
   |     ---------------- in this macro invocation
   |
   = note: this error originates in the macro `expand_to_dbg` (in Nightly builds, run with -Z macro-backtrace for more info)
help: remove the invocation before committing it to a version control system
   |
LL -             dbg!();
   |

---

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:119:31
   |
LL |         println!("dbg: {:?}", dbg!(s));
   |                               ^^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -         println!("dbg: {:?}", dbg!(s));
LL +         println!("dbg: {:?}", s);
   |

error: the `dbg!` macro is intended as a debugging tool
##[error]  --> tests/ui/dbg_macro/dbg_macro.rs:122:22
   |
LL |         print!("{}", dbg!(s));
   |                      ^^^^^^^
   |
help: remove the invocation before committing it to a version control system
   |
LL -         print!("{}", dbg!(s));
LL +         print!("{}", s);
   |


thread 'rustc' (55972) panicked at src/tools/clippy/clippy_lints/src/dbg_macro.rs:121:34:
internal error: entered unreachable code
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: <clippy_utils::diagnostics::span_lint_and_then::ClippyDiag<clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, &str, <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}> as rustc_errors::diagnostic::Diagnostic<()>>::into_diag
   4: <rustc_middle::lint::emit_lint_base<clippy_utils::diagnostics::span_lint_and_then::ClippyDiag<clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, &str, <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}>, rustc_middle::lint::LevelSpec<rustc_lint_defs::StableLintExpectationId>>::{closure#0} as core::ops::function::FnOnce<(rustc_errors::DiagCtxtHandle, rustc_errors::Level)>>::call_once::{shim:vtable#0}
   5: rustc_middle::lint::emit_lint_base::emit_lint_base_impl
   6: rustc_middle::lint::emit_lint_base::<clippy_utils::diagnostics::span_lint_and_then::ClippyDiag<clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, &str, <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}>, rustc_middle::lint::LevelSpec<rustc_lint_defs::StableLintExpectationId>>
   7: <rustc_lint::context::LateContext as rustc_lint::context::LintContext>::emit_span_lint::<rustc_error_messages::MultiSpan, clippy_utils::diagnostics::span_lint_and_then::ClippyDiag<clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, &str, <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}>>
   8: clippy_utils::diagnostics::span_lint_and_then::<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, &str, <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr::{closure#0}>
   9: <clippy_lints::dbg_macro::DbgMacro as rustc_lint::passes::LateLintPass>::check_expr
  10: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>::with_lint_attrs::<<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0}>
  11: rustc_hir::intravisit::walk_body::<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>
  12: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_nested_body
  13: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_fn
  14: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>
  15: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>::with_lint_attrs::<<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0}>
  16: rustc_hir::intravisit::walk_expr::<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>
---
  35: rustc_interface::passes::analysis::{closure#0}::{closure#0}
  36: rustc_data_structures::sync::parallel::par_fns
  37: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#0}>
  38: rustc_interface::passes::analysis
      [... omitted 1 frame ...]
  39: std::panicking::catch_unwind::<core::option::Option<rustc_interface::queries::Linker>, core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>>
  40: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
  41: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}>
  42: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
  43: std::panicking::catch_unwind::<(), core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}::{closure#0}>>
  44: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
  45: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}, ()>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 2, 2026

☀️ Try build successful (CI)
Build commit: ec00386 (ec003861e71dff1f92a4835792378f93fac0d0d7, parent: 48f976c7131e76b6a1ba6ba316c90d97ffdfe184)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (ec00386): 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
@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.3% [0.3%, 0.3%] 2
Regressions ❌
(secondary)
6.3% [0.1%, 25.0%] 32
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.0%] 14
All ❌✅ (primary) 0.3% [0.3%, 0.3%] 2

Max RSS (memory usage)

Results (primary -0.2%, secondary 0.9%)

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

mean range count
Regressions ❌
(primary)
4.8% [3.0%, 6.6%] 2
Regressions ❌
(secondary)
3.3% [1.5%, 7.6%] 9
Improvements ✅
(primary)
-3.5% [-8.0%, -0.6%] 3
Improvements ✅
(secondary)
-3.4% [-5.2%, -1.0%] 5
All ❌✅ (primary) -0.2% [-8.0%, 6.6%] 5

Cycles

Results (secondary 6.3%)

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)
8.1% [2.4%, 23.5%] 23
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.4% [-8.8%, -1.9%] 4
All ❌✅ (primary) - - 0

Binary size

Results (primary 0.1%, secondary 6.4%)

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

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.2%] 13
Regressions ❌
(secondary)
6.4% [0.0%, 15.0%] 26
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.0%, 0.2%] 13

Bootstrap: 510.698s -> 509.663s (-0.20%)
Artifact size: 400.57 MiB -> 400.84 MiB (0.07%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants