Allow storing format_args!() in variable by m-ou-se · Pull Request #140748 · rust-lang/rust (original) (raw)
The job x86_64-gnu-tools
failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
tests/ui/ref_option/ref_option.all.fixed ... ok
tests/ui/non_std_lazy_static/non_std_lazy_static_fixable.fixed ... ok
FAILED TEST: tests/ui/format.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-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/stage1-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-2c93a398ed1b3bf2.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-dd1f7a63ab09d2c0.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-04d95fc1b4230011.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-6d7a81bc2763ac5f.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-d494e6b7c1a6e89b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-d4e4179d28fd4b4c.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-c60316d1e8e896b7.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libquote-07dd62da2c3e7a6e.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libregex-75c78277780d7d9c.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cc2bae94717512c6.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9431a02aee605a39.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-1cf89851da371bc7.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-ab47290081742c1b.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/ui_test/0/tests/ui" "tests/ui/format.rs" "--edition" "2024"
error: actual output differed from expected
Execute `./x test src/tools/clippy --bless` to update `tests/ui/format.stderr` to the actual output
--- tests/ui/format.stderr
+++ <stderr output>
error: useless use of `format!`
--> tests/ui/format.rs:20:5
... 43 lines skipped ...
|
LL | format!("{}", "foo");
- | ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
+ | ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `("foo").to_string()`
error: useless use of `format!`
--> tests/ui/format.rs:44:5
|
LL | format!("{}", arg);
- | ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.to_string()`
+ | ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(arg).to_string()`
error: useless use of `format!`
--> tests/ui/format.rs:75:5
|
LL | format!("{}", 42.to_string());
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `42.to_string()`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(42.to_string()).to_string()`
error: useless use of `format!`
--> tests/ui/format.rs:78:5
|
LL | format!("{}", x.display().to_string());
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.display().to_string()`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(x.display().to_string()).to_string()`
error: useless use of `format!`
--> tests/ui/format.rs:83:18
|
LL | let _ = Some(format!("{}", a + "bar"));
- | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `a + "bar"`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(a + "bar").to_string()`
error: useless use of `format!`
... 7 lines skipped ...
|
LL | let _ = format!("{x}");
- | ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.to_string()`
+ | ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(x).to_string()`
error: useless use of `format!`
--> tests/ui/format.rs:98:13
|
LL | let _ = format!("{y}", y = x);
- | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.to_string()`
+ | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(x).to_string()`
error: useless use of `format!`
--> tests/ui/format.rs:103:13
|
LL | let _ = format!("{abc}");
- | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `abc.to_string()`
+ | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(abc).to_string()`
error: useless use of `format!`
--> tests/ui/format.rs:106:13
|
LL | let _ = format!("{xx}");
- | ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `xx.to_string()`
+ | ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(xx).to_string()`
error: aborting due to 15 previous errors
Full unnormalized output:
error: useless use of `format!`
##[error] --> tests/ui/format.rs:20:5
|
LL | format!("foo");
| ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
|
= note: `-D clippy::useless-format` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::useless_format)]`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:22:5
|
LL | format!("{{}}");
| ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{}".to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:24:5
|
LL | format!("{{}} abc {{}}");
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{} abc {}".to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:26:5
|
LL | / format!(
LL | |
LL | | r##"foo {{}}
LL | | " bar"##
LL | | );
| |_____^
|
help: consider using `.to_string()`
|
LL ~ r##"foo {}
LL ~ " bar"##.to_string();
|
error: useless use of `format!`
##[error] --> tests/ui/format.rs:32:13
|
LL | let _ = format!("");
| ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:35:5
|
LL | format!("{}", "foo");
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `("foo").to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:44:5
|
LL | format!("{}", arg);
| ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(arg).to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:75:5
|
LL | format!("{}", 42.to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(42.to_string()).to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:78:5
|
LL | format!("{}", x.display().to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(x.display().to_string()).to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:83:18
|
LL | let _ = Some(format!("{}", a + "bar"));
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(a + "bar").to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:88:22
|
LL | let _s: String = format!("{}", &*v.join("\n"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&*v.join("\n")).to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:95:13
|
LL | let _ = format!("{x}");
| ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(x).to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:98:13
|
LL | let _ = format!("{y}", y = x);
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(x).to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:103:13
|
LL | let _ = format!("{abc}");
| ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(abc).to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:106:13
|
LL | let _ = format!("{xx}");
| ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(xx).to_string()`
error: aborting due to 15 previous errors
full stderr:
error: useless use of `format!`
##[error] --> tests/ui/format.rs:20:5
|
LL | format!("foo");
| ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
|
= note: `-D clippy::useless-format` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::useless_format)]`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:22:5
|
LL | format!("{{}}");
| ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{}".to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:24:5
|
LL | format!("{{}} abc {{}}");
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{} abc {}".to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:26:5
|
LL | / format!(
LL | |
LL | | r##"foo {{}}
LL | | " bar"##
LL | | );
| |_____^
|
help: consider using `.to_string()`
|
LL ~ r##"foo {}
LL ~ " bar"##.to_string();
|
error: useless use of `format!`
##[error] --> tests/ui/format.rs:32:13
|
LL | let _ = format!("");
| ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:35:5
|
LL | format!("{}", "foo");
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `("foo").to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:44:5
|
LL | format!("{}", arg);
| ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(arg).to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:75:5
|
LL | format!("{}", 42.to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(42.to_string()).to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:78:5
|
LL | format!("{}", x.display().to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(x.display().to_string()).to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:83:18
|
LL | let _ = Some(format!("{}", a + "bar"));
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(a + "bar").to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:88:22
|
LL | let _s: String = format!("{}", &*v.join("\n"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&*v.join("\n")).to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:95:13
|
LL | let _ = format!("{x}");
| ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(x).to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:98:13
|
LL | let _ = format!("{y}", y = x);
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(x).to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:103:13
|
LL | let _ = format!("{abc}");
| ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(abc).to_string()`
error: useless use of `format!`
##[error] --> tests/ui/format.rs:106:13
|
LL | let _ = format!("{xx}");
| ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(xx).to_string()`
error: aborting due to 15 previous errors
full stdout:
FAILED TEST: tests/ui/format_args.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-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/stage1-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-2c93a398ed1b3bf2.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-dd1f7a63ab09d2c0.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-04d95fc1b4230011.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-6d7a81bc2763ac5f.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-d494e6b7c1a6e89b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-d4e4179d28fd4b4c.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-c60316d1e8e896b7.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libquote-07dd62da2c3e7a6e.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libregex-75c78277780d7d9c.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cc2bae94717512c6.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9431a02aee605a39.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-1cf89851da371bc7.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-ab47290081742c1b.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/ui_test/0/tests/ui" "tests/ui/format_args.rs" "--edition" "2024"
error: actual output differed from expected
Execute `./x test src/tools/clippy --bless` to update `tests/ui/format_args.stderr` to the actual output
--- tests/ui/format_args.stderr
+++ <stderr output>
---
- |
-LL | println!("error: something failed at {}", Location::caller().to_string());
- | ^^^^^^^^^^^^ help: remove this
-
-error: `to_string` applied to a type that implements `Display` in `eprint!` args
- --> tests/ui/format_args.rs:95:64
- |
-LL | eprint!("error: something failed at {}", Location::caller().to_string());
- | ^^^^^^^^^^^^ help: remove this
-
---
-
-error: `to_string` applied to a type that implements `Display` in `assert!` args
- --> tests/ui/format_args.rs:101:70
- |
-LL | assert!(true, "error: something failed at {}", Location::caller().to_string());
- | ^^^^^^^^^^^^ help: remove this
-
-error: `to_string` applied to a type that implements `Display` in `assert_eq!` args
- --> tests/ui/format_args.rs:103:73
- |
-LL | assert_eq!(0, 0, "error: something failed at {}", Location::caller().to_string());
- | ^^^^^^^^^^^^ help: remove this
-
-error: `to_string` applied to a type that implements `Display` in `assert_ne!` args
- --> tests/ui/format_args.rs:105:73
- |
-LL | assert_ne!(0, 0, "error: something failed at {}", Location::caller().to_string());
- | ^^^^^^^^^^^^ help: remove this
-
-error: `to_string` applied to a type that implements `Display` in `panic!` args
- --> tests/ui/format_args.rs:107:63
- |
-LL | panic!("error: something failed at {}", Location::caller().to_string());
- | ^^^^^^^^^^^^ help: remove this
-
-error: `to_string` applied to a type that implements `Display` in `println!` args
- --> tests/ui/format_args.rs:109:20
- |
-LL | println!("{}", X(1).to_string());
- | ^^^^^^^^^^^^^^^^ help: use this: `*X(1)`
-
-error: `to_string` applied to a type that implements `Display` in `println!` args
- --> tests/ui/format_args.rs:111:20
- |
-LL | println!("{}", Y(&X(1)).to_string());
- | ^^^^^^^^^^^^^^^^^^^^ help: use this: `***Y(&X(1))`
-
-error: `to_string` applied to a type that implements `Display` in `println!` args
- --> tests/ui/format_args.rs:113:24
- |
-LL | println!("{}", Z(1).to_string());
- | ^^^^^^^^^^^^ help: remove this
-
-error: `to_string` applied to a type that implements `Display` in `println!` args
- --> tests/ui/format_args.rs:115:20
- |
-LL | println!("{}", x.to_string());
- | ^^^^^^^^^^^^^ help: use this: `**x`
-
-error: `to_string` applied to a type that implements `Display` in `println!` args
- --> tests/ui/format_args.rs:117:20
- |
-LL | println!("{}", x_ref.to_string());
- | ^^^^^^^^^^^^^^^^^ help: use this: `***x_ref`
-
-error: `to_string` applied to a type that implements `Display` in `println!` args
--> tests/ui/format_args.rs:120:39
|
LL | println!("{foo}{bar}", foo = "foo".to_string(), bar = "bar");
| ^^^^^^^^^^^^ help: remove this
+ |
+ = note: `-D clippy::to-string-in-format-args` implied by `-D warnings`
+ = help: to override `-D warnings` add `#[allow(clippy::to_string_in_format_args)]`
error: `to_string` applied to a type that implements `Display` in `println!` args
... 15 lines skipped ...
| ^^^^^^^^^^^^ help: remove this
-error: `to_string` applied to a type that implements `Display` in `println!` args
- --> tests/ui/format_args.rs:128:37
- |
-LL | println!("{}", my_other_macro!().to_string());
- | ^^^^^^^^^^^^ help: remove this
-
-error: `to_string` applied to a type that implements `Display` in `print!` args
- --> tests/ui/format_args.rs:141:37
- |
-LL | print!("{}", (Location::caller().to_string()));
- | ^^^^^^^^^^^^ help: remove this
-
-error: `to_string` applied to a type that implements `Display` in `print!` args
- --> tests/ui/format_args.rs:143:39
- |
-LL | print!("{}", ((Location::caller()).to_string()));
- | ^^^^^^^^^^^^ help: remove this
-
error: `to_string` applied to a type that implements `Display` in `format!` args
--> tests/ui/format_args.rs:172:38
... 2 lines skipped ...
| ^^^^^^^^^^^^ help: remove this
-error: `to_string` applied to a type that implements `Display` in `println!` args
- --> tests/ui/format_args.rs:187:24
- |
-LL | println!("{}", original[..10].to_string());
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use this: `&original[..10]`
+error: aborting due to 5 previous errors
-error: aborting due to 26 previous errors
-
Full unnormalized output:
error: `to_string` applied to a type that implements `Display` in `println!` args
##[error] --> tests/ui/format_args.rs:120:39
|
LL | println!("{foo}{bar}", foo = "foo".to_string(), bar = "bar");
| ^^^^^^^^^^^^ help: remove this
|
= note: `-D clippy::to-string-in-format-args` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::to_string_in_format_args)]`
error: `to_string` applied to a type that implements `Display` in `println!` args
##[error] --> tests/ui/format_args.rs:122:52
|
LL | println!("{foo}{bar}", foo = "foo", bar = "bar".to_string());
| ^^^^^^^^^^^^ help: remove this
error: `to_string` applied to a type that implements `Display` in `println!` args
##[error] --> tests/ui/format_args.rs:124:39
|
LL | println!("{foo}{bar}", bar = "bar".to_string(), foo = "foo");
| ^^^^^^^^^^^^ help: remove this
error: `to_string` applied to a type that implements `Display` in `println!` args
##[error] --> tests/ui/format_args.rs:126:52
|
LL | println!("{foo}{bar}", bar = "bar", foo = "foo".to_string());
| ^^^^^^^^^^^^ help: remove this
error: `to_string` applied to a type that implements `Display` in `format!` args
##[error] --> tests/ui/format_args.rs:172:38
|
LL | let x = format!("{} {}", a, b.to_string());
| ^^^^^^^^^^^^ help: remove this
error: aborting due to 5 previous errors
---
full stderr:
error: `to_string` applied to a type that implements `Display` in `println!` args
##[error] --> tests/ui/format_args.rs:120:39
|
LL | println!("{foo}{bar}", foo = "foo".to_string(), bar = "bar");
| ^^^^^^^^^^^^ help: remove this
|
= note: `-D clippy::to-string-in-format-args` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::to_string_in_format_args)]`
error: `to_string` applied to a type that implements `Display` in `println!` args
##[error] --> tests/ui/format_args.rs:122:52
|
LL | println!("{foo}{bar}", foo = "foo", bar = "bar".to_string());
| ^^^^^^^^^^^^ help: remove this
error: `to_string` applied to a type that implements `Display` in `println!` args
##[error] --> tests/ui/format_args.rs:124:39
|
LL | println!("{foo}{bar}", bar = "bar".to_string(), foo = "foo");
| ^^^^^^^^^^^^ help: remove this
error: `to_string` applied to a type that implements `Display` in `println!` args
##[error] --> tests/ui/format_args.rs:126:52
|
LL | println!("{foo}{bar}", bar = "bar", foo = "foo".to_string());
| ^^^^^^^^^^^^ help: remove this
error: `to_string` applied to a type that implements `Display` in `format!` args
##[error] --> tests/ui/format_args.rs:172:38
|
LL | let x = format!("{} {}", a, b.to_string());
| ^^^^^^^^^^^^ help: remove this
error: aborting due to 5 previous errors
full stdout:
FAILED TEST: tests/ui/manual_inspect.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-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/stage1-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-2c93a398ed1b3bf2.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-dd1f7a63ab09d2c0.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-04d95fc1b4230011.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-6d7a81bc2763ac5f.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-d494e6b7c1a6e89b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-d4e4179d28fd4b4c.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-c60316d1e8e896b7.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libquote-07dd62da2c3e7a6e.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libregex-75c78277780d7d9c.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cc2bae94717512c6.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9431a02aee605a39.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-1cf89851da371bc7.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-ab47290081742c1b.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/ui_test/0/tests/ui" "tests/ui/manual_inspect.rs" "--edition" "2024"
error: actual output differed from expected
Execute `./x test src/tools/clippy --bless` to update `tests/ui/manual_inspect.stderr` to the actual output
--- tests/ui/manual_inspect.stderr
+++ <stderr output>
---
-LL | | })
-LL | | .count();
- | |________________^
- |
- = help: make sure you did not confuse `map` with `filter`, `for_each` or `inspect`
- = note: `-D clippy::suspicious-map` implied by `-D warnings`
- = help: to override `-D warnings` add `#[allow(clippy::suspicious_map)]`
-
error: using `map` over `inspect`
--> tests/ui/manual_inspect.rs:170:10
... 22 lines skipped ...
|
---
= note: `-D clippy::manual-inspect` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::manual_inspect)]`
help: try
|
LL ~ let _ = Some(0).inspect(|&x| {
LL |
LL ~ println!("{}", x);
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:11:21
|
LL | let _ = Some(0).map(|x| {
| ^^^
|
help: try
|
LL ~ let _ = Some(0).inspect(|&x| {
LL |
LL ~ println!("{x}");
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:17:21
|
LL | let _ = Some(0).map(|x| {
| ^^^
|
help: try
|
LL ~ let _ = Some(0).inspect(|&x| {
LL |
LL ~ println!("{}", x * 5 + 1);
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:23:21
|
LL | let _ = Some(0).map(|x| {
| ^^^
|
help: try
|
LL ~ let _ = Some(0).inspect(|&x| {
LL |
LL | if x == 0 {
LL | panic!();
LL ~ }
|
---
| ^^^
|
help: try
|
LL ~ let _ = Some(0).inspect(|&x| {
LL |
...
LL | panic!();
LL ~ }
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:83:41
|
LL | let _ = Some((String::new(), 0u32)).map(|x| {
| ^^^
|
help: try
|
LL ~ let _ = Some((String::new(), 0u32)).inspect(|x| {
LL |
...
LL | panic!();
LL ~ }
|
---
| ^^^
|
help: try
|
LL ~ let _ = Some(String::new()).inspect(|x| {
LL |
LL | if x.is_empty() {
LL | let _ = || {
LL ~ let _x = x;
LL | };
LL ~ return ;
LL | }
LL ~ println!("test");
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:122:21
|
LL | let _ = Some(0).map(|x| {
| ^^^
|
help: try
|
LL ~ let _ = Some(0).inspect(|&x| {
LL |
...
LL | panic!();
LL ~ }
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:138:46
|
LL | let _ = Some(Cell2(Cell::new(0u32))).map(|x| {
| ^^^
|
help: try
|
LL ~ let _ = Some(Cell2(Cell::new(0u32))).inspect(|x| {
LL |
LL ~ x.0.set(1);
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:155:34
|
LL | let _: Result<_, ()> = Ok(0).map(|x| {
| ^^^
|
help: try
|
LL ~ let _: Result<_, ()> = Ok(0).inspect(|&x| {
LL |
LL ~ println!("{}", x);
|
error: using `map_err` over `inspect_err`
##[error] --> tests/ui/manual_inspect.rs:161:35
|
LL | let _: Result<(), _> = Err(0).map_err(|x| {
| ^^^^^^^
|
help: try
|
LL ~ let _: Result<(), _> = Err(0).inspect_err(|&x| {
LL |
LL ~ println!("{}", x);
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:170:10
|
LL | .map(|x| {
| ^^^
|
help: try
|
LL ~ .inspect(|&x| {
LL |
LL ~ println!("{}", x);
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:203:30
|
LL | if let Some(x) = Some(1).map(|x| { println!("{x}");
| ^^^
|
help: try
|
LL ~ if let Some(x) = Some(1).inspect(|&x| { println!("{x}");
LL | // Do not collapse code into this comment
LL ~ }) {
|
error: aborting due to 13 previous errors
---
= note: `-D clippy::manual-inspect` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::manual_inspect)]`
help: try
|
LL ~ let _ = Some(0).inspect(|&x| {
LL |
LL ~ println!("{}", x);
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:11:21
|
LL | let _ = Some(0).map(|x| {
| ^^^
|
help: try
|
LL ~ let _ = Some(0).inspect(|&x| {
LL |
LL ~ println!("{x}");
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:17:21
|
LL | let _ = Some(0).map(|x| {
| ^^^
|
help: try
|
LL ~ let _ = Some(0).inspect(|&x| {
LL |
LL ~ println!("{}", x * 5 + 1);
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:23:21
|
LL | let _ = Some(0).map(|x| {
| ^^^
|
help: try
|
LL ~ let _ = Some(0).inspect(|&x| {
LL |
LL | if x == 0 {
LL | panic!();
LL ~ }
|
---
| ^^^
|
help: try
|
LL ~ let _ = Some(0).inspect(|&x| {
LL |
...
LL | panic!();
LL ~ }
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:83:41
|
LL | let _ = Some((String::new(), 0u32)).map(|x| {
| ^^^
|
help: try
|
LL ~ let _ = Some((String::new(), 0u32)).inspect(|x| {
LL |
...
LL | panic!();
LL ~ }
|
---
| ^^^
|
help: try
|
LL ~ let _ = Some(String::new()).inspect(|x| {
LL |
LL | if x.is_empty() {
LL | let _ = || {
LL ~ let _x = x;
LL | };
LL ~ return ;
LL | }
LL ~ println!("test");
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:122:21
|
LL | let _ = Some(0).map(|x| {
| ^^^
|
help: try
|
LL ~ let _ = Some(0).inspect(|&x| {
LL |
...
LL | panic!();
LL ~ }
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:138:46
|
LL | let _ = Some(Cell2(Cell::new(0u32))).map(|x| {
| ^^^
|
help: try
|
LL ~ let _ = Some(Cell2(Cell::new(0u32))).inspect(|x| {
LL |
LL ~ x.0.set(1);
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:155:34
|
LL | let _: Result<_, ()> = Ok(0).map(|x| {
| ^^^
|
help: try
|
LL ~ let _: Result<_, ()> = Ok(0).inspect(|&x| {
LL |
LL ~ println!("{}", x);
|
error: using `map_err` over `inspect_err`
##[error] --> tests/ui/manual_inspect.rs:161:35
|
LL | let _: Result<(), _> = Err(0).map_err(|x| {
| ^^^^^^^
|
help: try
|
LL ~ let _: Result<(), _> = Err(0).inspect_err(|&x| {
LL |
LL ~ println!("{}", x);
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:170:10
|
LL | .map(|x| {
| ^^^
|
help: try
|
LL ~ .inspect(|&x| {
LL |
LL ~ println!("{}", x);
|
error: using `map` over `inspect`
##[error] --> tests/ui/manual_inspect.rs:203:30
|
LL | if let Some(x) = Some(1).map(|x| { println!("{x}");
| ^^^
|
help: try
|
LL ~ if let Some(x) = Some(1).inspect(|&x| { println!("{x}");
LL | // Do not collapse code into this comment
LL ~ }) {
|
error: aborting due to 13 previous errors
full stdout:
FAILED TEST: tests/ui/unnecessary_os_str_debug_formatting.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-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/stage1-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-2c93a398ed1b3bf2.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-dd1f7a63ab09d2c0.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-04d95fc1b4230011.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-6d7a81bc2763ac5f.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-d494e6b7c1a6e89b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-d4e4179d28fd4b4c.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-c60316d1e8e896b7.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libquote-07dd62da2c3e7a6e.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libregex-75c78277780d7d9c.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cc2bae94717512c6.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9431a02aee605a39.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-1cf89851da371bc7.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-ab47290081742c1b.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/ui_test/0/tests/ui" "tests/ui/unnecessary_os_str_debug_formatting.rs" "--edition" "2024"
error: no output was emitted
Execute `./x test src/tools/clippy --bless` to remove `tests/ui/unnecessary_os_str_debug_formatting.stderr`
error: diagnostic code `clippy::unnecessary_debug_formatting` not found on line 15
---
error: diagnostic code `clippy::unnecessary_debug_formatting` not found on line 18
##[error] --> tests/ui/unnecessary_os_str_debug_formatting.rs🔞33
|
18 | println!("{os_str:?}"); //~ unnecessary_debug_formatting
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
|
error: diagnostic code `clippy::unnecessary_debug_formatting` not found on line 19
##[error] --> tests/ui/unnecessary_os_str_debug_formatting.rs:19:36
|
19 | println!("{os_string:?}"); //~ unnecessary_debug_formatting
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
|
error: diagnostic code `clippy::unnecessary_debug_formatting` not found on line 21
##[error] --> tests/ui/unnecessary_os_str_debug_formatting.rs:21:50
|
21 | let _: String = format!("{:?}", os_str); //~ unnecessary_debug_formatting
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
|
error: diagnostic code `clippy::unnecessary_debug_formatting` not found on line 22
##[error] --> tests/ui/unnecessary_os_str_debug_formatting.rs:22:53
|
22 | let _: String = format!("{:?}", os_string); //~ unnecessary_debug_formatting
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
|
full stderr:
full stdout:
FAILED TEST: tests/ui/unnecessary_iter_cloned.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-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/stage1-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-2c93a398ed1b3bf2.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-dd1f7a63ab09d2c0.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-04d95fc1b4230011.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-6d7a81bc2763ac5f.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-d494e6b7c1a6e89b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-d4e4179d28fd4b4c.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-c60316d1e8e896b7.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libquote-07dd62da2c3e7a6e.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libregex-75c78277780d7d9c.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cc2bae94717512c6.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9431a02aee605a39.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-1cf89851da371bc7.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-ab47290081742c1b.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/ui_test/0/tests/ui" "tests/ui/unnecessary_iter_cloned.rs" "--edition" "2024"
error: actual output differed from expected
Execute `./x test src/tools/clippy --bless` to update `tests/ui/unnecessary_iter_cloned.stderr` to the actual output
--- tests/ui/unnecessary_iter_cloned.stderr
+++ <stderr output>
---
-error: unnecessary use of `cloned`
- --> tests/ui/unnecessary_iter_cloned.rs:179:18
- |
-LL | for c in v.iter().cloned() {
- | ^^^^^^^^^^^^^^^^^ help: remove any references to the binding: `v.iter()`
-error: unnecessary use of `cloned`
- --> tests/ui/unnecessary_iter_cloned.rs:188:18
- |
-LL | for c in v.iter().cloned() {
- | ^^^^^^^^^^^^^^^^^
- |
-help: remove any references to the binding
- |
-LL ~ for c in v.iter() {
-LL |
-LL |
-LL ~ let ref_c = c;
- |
+thread 'rustc' panicked at /checkout/compiler/rustc_errors/src/diagnostic.rs:926:9:
+assertion `left == right` failed: Span must not be empty and have no suggestion
+ left: Some(SubstitutionPart { span: tests/ui/unnecessary_iter_cloned.rs:182:24: 182:24 (#0), snippet: "" })
+ right: None
+stack backtrace:
+ 0: 0x7fa6fdedbe60 - <<std[722de03b977f82e2]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[b85b81897dd7c607]::fmt::Display>::fmt
+ 1: 0x7fa6fdf383bf - core[b85b81897dd7c607]::fmt::write
+ 2: 0x7fa6fdeced49 - <std[722de03b977f82e2]::sys::stdio::unix::Stderr as std[722de03b977f82e2]::io::Write>::write_fmt
+ 3: 0x7fa6fdedbd02 - <std[722de03b977f82e2]::sys::backtrace::BacktraceLock>::print
+ 4: 0x7fa6fdee0508 - std[722de03b977f82e2]::panicking::default_hook::{closure#0}
+ 5: 0x7fa6fdee02a2 - std[722de03b977f82e2]::panicking::default_hook
+ 6: 0x7fa6f949af22 - <alloc[8f667485acfd4fc8]::boxed::Box<rustc_driver_impl[5c0983139a933bca]::install_ice_hook::{closure#1}> as core[b85b81897dd7c607]::ops::function::Fn<(&dyn for<'a, 'b> core[b85b81897dd7c607]::ops::function::Fn<(&'a std[722de03b977f82e2]::panic::PanicHookInfo<'b>,), Output = ()> + core[b85b81897dd7c607]:📑:Sync + core[b85b81897dd7c607]:📑:Send, &std[722de03b977f82e2]::panic::PanicHookInfo)>>::call
+ 7: 0x7fa6fdee117b - std[722de03b977f82e2]::panicking::rust_panic_with_hook
+ 8: 0x7fa6fdee0d7e - std[722de03b977f82e2]::panicking::begin_panic_handler::{closure#0}
+ 9: 0x7fa6fdedc479 - std[722de03b977f82e2]::sys::backtrace::__rust_end_short_backtrace::<std[722de03b977f82e2]::panicking::begin_panic_handler::{closure#0}, !>
+ 10: 0x7fa6fdee098d - __rustc[210dc653f36a8667]::rust_begin_unwind
+ 11: 0x7fa6fdf34000 - core[b85b81897dd7c607]::panicking::panic_fmt
+ 12: 0x7fa6fdf3456a - core[b85b81897dd7c607]::panicking::assert_failed_inner
+ 13: 0x7fa6fd6e3a8f - core[b85b81897dd7c607]::panicking::assert_failed::<core[b85b81897dd7c607]::option::Option<&rustc_errors[8c94111977c95880]::SubstitutionPart>, core[b85b81897dd7c607]::option::Option<&rustc_errors[8c94111977c95880]::SubstitutionPart>>
+ 14: 0x55edf21c8999 - <rustc_errors[8c94111977c95880]::diagnostic::Diag<()>>::multipart_suggestion_with_style::<&str>
+ 15: 0x55edf23af504 - <clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, alloc[8f667485acfd4fc8]:🧵:String, clippy_lints[2d5f372497376e35]::methods::unnecessary_iter_cloned::check_for_loop_iter::{closure#1}>::{closure#0} as core[b85b81897dd7c607]::ops::function::FnOnce<(&mut rustc_errors[8c94111977c95880]::diagnostic::Diag<()>,)>>::call_once::{shim:vtable#0}
+ 16: 0x7fa6fd7158b3 - rustc_middle[4a64cfee706b595]::lint::lint_level::lint_level_impl
+ 17: 0x55edf237a38a - rustc_middle[4a64cfee706b595]::lint::lint_level::<clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, alloc[8f667485acfd4fc8]:🧵:String, clippy_lints[2d5f372497376e35]::methods::unnecessary_iter_cloned::check_for_loop_iter::{closure#1}>::{closure#0}>
+ 18: 0x55edf2392cc1 - <rustc_lint[96dc6baabd10bd4e]::context::LateContext as rustc_lint[96dc6baabd10bd4e]::context::LintContext>::opt_span_lint::<rustc_span[5de9bfc504d26a6f]::span_encoding::Span, clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, alloc[8f667485acfd4fc8]:🧵:String, clippy_lints[2d5f372497376e35]::methods::unnecessary_iter_cloned::check_for_loop_iter::{closure#1}>::{closure#0}>
+ 19: 0x55edf2202f93 - clippy_lints[2d5f372497376e35]::methods::unnecessary_iter_cloned::check_for_loop_iter
+ 20: 0x55edf2462d87 - <clippy_lints[2d5f372497376e35]::methods::Methods as rustc_lint[96dc6baabd10bd4e]::passes::LateLintPass>::check_expr
+ 21: 0x7fa6fbdfe513 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
+ 22: 0x7fa6fbed38fb - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
+ 23: 0x7fa6fbdfe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
+ 24: 0x7fa6fbed2e1e - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
+ 25: 0x7fa6fbdfe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
+ 26: 0x7fa6fbed337f - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
+ 27: 0x7fa6fbdfe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
+ 28: 0x7fa6fbe02582 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_block
+ 29: 0x7fa6fbdfe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
+ 30: 0x7fa6fbdfc724 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_body
+ 31: 0x7fa6fbdffae9 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_fn
+ 32: 0x7fa6fbed6323 - rustc_hir[a97542dc954c1f22]::intravisit::walk_item::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
+ 33: 0x7fa6fbdf3de4 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_item
+ 34: 0x7fa6fbe0163c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_mod
+ 35: 0x7fa6fbdf3de4 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_item
+ 36: 0x7fa6fbe0163c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_mod
+ 37: 0x7fa6fbe05531 - rustc_lint[96dc6baabd10bd4e]::late::late_lint_crate
+ 38: 0x7fa6fbd8dbce - rustc_data_structures[6b0c338be68cbdf0]::sync::parallel::serial_join::<rustc_lint[96dc6baabd10bd4e]::late::check_crate::{closure#0}, rustc_lint[96dc6baabd10bd4e]::late::check_crate::{closure#1}, (), ()>
+ 39: 0x7fa6fbe05b7b - rustc_lint[96dc6baabd10bd4e]::late::check_crate
+ 40: 0x7fa6f96d3fe3 - <rustc_data_structures[6b0c338be68cbdf0]::sync::parallel::ParallelGuard>::run::<(), rustc_interface[7e2780b9127a51f3]::passes::analysis::{closure#0}::{closure#1}::{closure#0}>
+ 41: 0x7fa6f9891c51 - <rustc_session[1697b6e1c1bf6b08]::session::Session>::time::<(), rustc_interface[7e2780b9127a51f3]::passes::analysis::{closure#0}>
+ 42: 0x7fa6f9820bf2 - rustc_interface[7e2780b9127a51f3]::passes::analysis
+ 43: 0x7fa6fc1821f3 - rustc_query_impl[296c58625f4e3441]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[296c58625f4e3441]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4a64cfee706b595]::query::erase::Erased<[u8; 0usize]>>
+ 44: 0x7fa6fc0aa0d1 - <rustc_query_impl[296c58625f4e3441]::query_impl::analysis::dynamic_query::{closure#2} as core[b85b81897dd7c607]::ops::function::FnOnce<(rustc_middle[4a64cfee706b595]::ty::context::TyCtxt, ())>>::call_once
+ 45: 0x7fa6fbf70269 - rustc_query_system[e31d6d9fbccfd6f2]::query::plumbing::try_execute_query::<rustc_query_impl[296c58625f4e3441]::DynamicConfig<rustc_query_system[e31d6d9fbccfd6f2]::query::caches::SingleCache<rustc_middle[4a64cfee706b595]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[296c58625f4e3441]::plumbing::QueryCtxt, false>
+ 46: 0x7fa6fc2785d2 - rustc_query_impl[296c58625f4e3441]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
+ 47: 0x7fa6f942e833 - <std[722de03b977f82e2]::thread::local::LocalKey<core[b85b81897dd7c607]::cell::Cell<*const ()>>>::with::<rustc_middle[4a64cfee706b595]::ty::context::tls::enter_context<<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>::enter<rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>::{closure#1}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>::{closure#0}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>
+ 48: 0x7fa6f944b072 - <rustc_middle[4a64cfee706b595]::ty::context::TyCtxt>::create_global_ctxt::<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
+ 49: 0x7fa6f942ae46 - <rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[b85b81897dd7c607]::ops::function::FnOnce<(&rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
+ 50: 0x7fa6f949a2b6 - <alloc[8f667485acfd4fc8]::boxed::Box<dyn for<'a> core[b85b81897dd7c607]::ops::function::FnOnce<(&'a rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &'a std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena<'a>>, &'a rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena<'a>>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}), Output = core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>> as core[b85b81897dd7c607]::ops::function::FnOnce<(&rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2})>>::call_once
+ 51: 0x7fa6f94087e7 - rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt::<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>
+ 52: 0x7fa6f93a2a69 - rustc_span[5de9bfc504d26a6f]::create_session_globals_then::<(), rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
+ 53: 0x7fa6f93c3dd9 - std[722de03b977f82e2]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
+ 54: 0x7fa6f93c6e44 - <<std[722de03b977f82e2]::thread::Builder>::spawn_unchecked_<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[b85b81897dd7c607]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
+ 55: 0x7fa6fdee4aa5 - <std[722de03b977f82e2]::sys::pal::unix::thread::Thread>:🆕:thread_start
+ 56: 0x7fa6f706bac3 - <unknown>
+ 57: 0x7fa6f70fd850 - <unknown>
+ 58: 0x0 - <unknown>
-error: unnecessary use of `cloned`
- --> tests/ui/unnecessary_iter_cloned.rs:198:23
- |
-LL | for (i, c) in v.iter().cloned() {
- | ^^^^^^^^^^^^^^^^^
- |
-help: remove any references to the binding
- |
-LL ~ for (i, c) in v.iter() {
-LL |
-LL |
-LL ~ let ref_c = c;
-LL ~ let ref_i = i;
- |
+error: the compiler unexpectedly panicked. this is a bug.
-error: aborting due to 5 previous errors
+note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml
+note: please make sure that you have updated to the latest nightly
+
+note: rustc 1.88.0-nightly (7ab5976f9 2025-05-07) running on x86_64-unknown-linux-gnu
+
---
Full unnormalized output:
error: unnecessary use of `copied`
##[error] --> tests/ui/unnecessary_iter_cloned.rs:31:22
|
LL | for (t, path) in files.iter().copied() {
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::unnecessary-to-owned` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_to_owned)]`
help: remove any references to the binding
|
LL ~ for (t, path) in files {
LL |
LL ~ let other = match get_file_path(t) {
|
error: unnecessary use of `copied`
##[error] --> tests/ui/unnecessary_iter_cloned.rs:47:22
|
LL | for (t, path) in files.iter().copied() {
| ^^^^^^^^^^^^^^^^^^^^^
|
help: remove any references to the binding
|
LL ~ for (t, path) in files.iter() {
LL |
LL ~ let other = match get_file_path(t) {
|
thread 'rustc' panicked at /checkout/compiler/rustc_errors/src/diagnostic.rs:926:9:
assertion `left == right` failed: Span must not be empty and have no suggestion
left: Some(SubstitutionPart { span: tests/ui/unnecessary_iter_cloned.rs:182:24: 182:24 (#0), snippet: "" })
right: None
stack backtrace:
0: 0x7fa6fdedbe60 - <<std[722de03b977f82e2]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[b85b81897dd7c607]::fmt::Display>::fmt
1: 0x7fa6fdf383bf - core[b85b81897dd7c607]::fmt::write
2: 0x7fa6fdeced49 - <std[722de03b977f82e2]::sys::stdio::unix::Stderr as std[722de03b977f82e2]::io::Write>::write_fmt
3: 0x7fa6fdedbd02 - <std[722de03b977f82e2]::sys::backtrace::BacktraceLock>::print
4: 0x7fa6fdee0508 - std[722de03b977f82e2]::panicking::default_hook::{closure#0}
5: 0x7fa6fdee02a2 - std[722de03b977f82e2]::panicking::default_hook
6: 0x7fa6f949af22 - <alloc[8f667485acfd4fc8]::boxed::Box<rustc_driver_impl[5c0983139a933bca]::install_ice_hook::{closure#1}> as core[b85b81897dd7c607]::ops::function::Fn<(&dyn for<'a, 'b> core[b85b81897dd7c607]::ops::function::Fn<(&'a std[722de03b977f82e2]::panic::PanicHookInfo<'b>,), Output = ()> + core[b85b81897dd7c607]:📑:Sync + core[b85b81897dd7c607]:📑:Send, &std[722de03b977f82e2]::panic::PanicHookInfo)>>::call
7: 0x7fa6fdee117b - std[722de03b977f82e2]::panicking::rust_panic_with_hook
8: 0x7fa6fdee0d7e - std[722de03b977f82e2]::panicking::begin_panic_handler::{closure#0}
9: 0x7fa6fdedc479 - std[722de03b977f82e2]::sys::backtrace::__rust_end_short_backtrace::<std[722de03b977f82e2]::panicking::begin_panic_handler::{closure#0}, !>
10: 0x7fa6fdee098d - __rustc[210dc653f36a8667]::rust_begin_unwind
11: 0x7fa6fdf34000 - core[b85b81897dd7c607]::panicking::panic_fmt
12: 0x7fa6fdf3456a - core[b85b81897dd7c607]::panicking::assert_failed_inner
13: 0x7fa6fd6e3a8f - core[b85b81897dd7c607]::panicking::assert_failed::<core[b85b81897dd7c607]::option::Option<&rustc_errors[8c94111977c95880]::SubstitutionPart>, core[b85b81897dd7c607]::option::Option<&rustc_errors[8c94111977c95880]::SubstitutionPart>>
14: 0x55edf21c8999 - <rustc_errors[8c94111977c95880]::diagnostic::Diag<()>>::multipart_suggestion_with_style::<&str>
15: 0x55edf23af504 - <clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, alloc[8f667485acfd4fc8]:🧵:String, clippy_lints[2d5f372497376e35]::methods::unnecessary_iter_cloned::check_for_loop_iter::{closure#1}>::{closure#0} as core[b85b81897dd7c607]::ops::function::FnOnce<(&mut rustc_errors[8c94111977c95880]::diagnostic::Diag<()>,)>>::call_once::{shim:vtable#0}
16: 0x7fa6fd7158b3 - rustc_middle[4a64cfee706b595]::lint::lint_level::lint_level_impl
17: 0x55edf237a38a - rustc_middle[4a64cfee706b595]::lint::lint_level::<clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, alloc[8f667485acfd4fc8]:🧵:String, clippy_lints[2d5f372497376e35]::methods::unnecessary_iter_cloned::check_for_loop_iter::{closure#1}>::{closure#0}>
18: 0x55edf2392cc1 - <rustc_lint[96dc6baabd10bd4e]::context::LateContext as rustc_lint[96dc6baabd10bd4e]::context::LintContext>::opt_span_lint::<rustc_span[5de9bfc504d26a6f]::span_encoding::Span, clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, alloc[8f667485acfd4fc8]:🧵:String, clippy_lints[2d5f372497376e35]::methods::unnecessary_iter_cloned::check_for_loop_iter::{closure#1}>::{closure#0}>
19: 0x55edf2202f93 - clippy_lints[2d5f372497376e35]::methods::unnecessary_iter_cloned::check_for_loop_iter
20: 0x55edf2462d87 - <clippy_lints[2d5f372497376e35]::methods::Methods as rustc_lint[96dc6baabd10bd4e]::passes::LateLintPass>::check_expr
21: 0x7fa6fbdfe513 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
22: 0x7fa6fbed38fb - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
23: 0x7fa6fbdfe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
24: 0x7fa6fbed2e1e - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
25: 0x7fa6fbdfe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
26: 0x7fa6fbed337f - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
27: 0x7fa6fbdfe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
28: 0x7fa6fbe02582 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_block
29: 0x7fa6fbdfe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
30: 0x7fa6fbdfc724 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_body
31: 0x7fa6fbdffae9 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_fn
32: 0x7fa6fbed6323 - rustc_hir[a97542dc954c1f22]::intravisit::walk_item::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
33: 0x7fa6fbdf3de4 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_item
34: 0x7fa6fbe0163c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_mod
35: 0x7fa6fbdf3de4 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_item
36: 0x7fa6fbe0163c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_mod
37: 0x7fa6fbe05531 - rustc_lint[96dc6baabd10bd4e]::late::late_lint_crate
38: 0x7fa6fbd8dbce - rustc_data_structures[6b0c338be68cbdf0]::sync::parallel::serial_join::<rustc_lint[96dc6baabd10bd4e]::late::check_crate::{closure#0}, rustc_lint[96dc6baabd10bd4e]::late::check_crate::{closure#1}, (), ()>
39: 0x7fa6fbe05b7b - rustc_lint[96dc6baabd10bd4e]::late::check_crate
40: 0x7fa6f96d3fe3 - <rustc_data_structures[6b0c338be68cbdf0]::sync::parallel::ParallelGuard>::run::<(), rustc_interface[7e2780b9127a51f3]::passes::analysis::{closure#0}::{closure#1}::{closure#0}>
41: 0x7fa6f9891c51 - <rustc_session[1697b6e1c1bf6b08]::session::Session>::time::<(), rustc_interface[7e2780b9127a51f3]::passes::analysis::{closure#0}>
42: 0x7fa6f9820bf2 - rustc_interface[7e2780b9127a51f3]::passes::analysis
43: 0x7fa6fc1821f3 - rustc_query_impl[296c58625f4e3441]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[296c58625f4e3441]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4a64cfee706b595]::query::erase::Erased<[u8; 0usize]>>
44: 0x7fa6fc0aa0d1 - <rustc_query_impl[296c58625f4e3441]::query_impl::analysis::dynamic_query::{closure#2} as core[b85b81897dd7c607]::ops::function::FnOnce<(rustc_middle[4a64cfee706b595]::ty::context::TyCtxt, ())>>::call_once
45: 0x7fa6fbf70269 - rustc_query_system[e31d6d9fbccfd6f2]::query::plumbing::try_execute_query::<rustc_query_impl[296c58625f4e3441]::DynamicConfig<rustc_query_system[e31d6d9fbccfd6f2]::query::caches::SingleCache<rustc_middle[4a64cfee706b595]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[296c58625f4e3441]::plumbing::QueryCtxt, false>
46: 0x7fa6fc2785d2 - rustc_query_impl[296c58625f4e3441]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
47: 0x7fa6f942e833 - <std[722de03b977f82e2]::thread::local::LocalKey<core[b85b81897dd7c607]::cell::Cell<*const ()>>>::with::<rustc_middle[4a64cfee706b595]::ty::context::tls::enter_context<<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>::enter<rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>::{closure#1}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>::{closure#0}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>
48: 0x7fa6f944b072 - <rustc_middle[4a64cfee706b595]::ty::context::TyCtxt>::create_global_ctxt::<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
49: 0x7fa6f942ae46 - <rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[b85b81897dd7c607]::ops::function::FnOnce<(&rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
50: 0x7fa6f949a2b6 - <alloc[8f667485acfd4fc8]::boxed::Box<dyn for<'a> core[b85b81897dd7c607]::ops::function::FnOnce<(&'a rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &'a std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena<'a>>, &'a rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena<'a>>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}), Output = core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>> as core[b85b81897dd7c607]::ops::function::FnOnce<(&rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2})>>::call_once
51: 0x7fa6f94087e7 - rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt::<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>
52: 0x7fa6f93a2a69 - rustc_span[5de9bfc504d26a6f]::create_session_globals_then::<(), rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
53: 0x7fa6f93c3dd9 - std[722de03b977f82e2]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
54: 0x7fa6f93c6e44 - <<std[722de03b977f82e2]::thread::Builder>::spawn_unchecked_<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[b85b81897dd7c607]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
55: 0x7fa6fdee4aa5 - <std[722de03b977f82e2]::sys::pal::unix::thread::Thread>:🆕:thread_start
56: 0x7fa6f706bac3 - <unknown>
57: 0x7fa6f70fd850 - <unknown>
58: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml
note: please make sure that you have updated to the latest nightly
note: rustc 1.88.0-nightly (7ab5976f9 2025-05-07) running on x86_64-unknown-linux-gnu
---
full stderr:
error: unnecessary use of `copied`
##[error] --> tests/ui/unnecessary_iter_cloned.rs:31:22
|
LL | for (t, path) in files.iter().copied() {
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::unnecessary-to-owned` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_to_owned)]`
help: remove any references to the binding
|
LL ~ for (t, path) in files {
LL |
LL ~ let other = match get_file_path(t) {
|
error: unnecessary use of `copied`
##[error] --> tests/ui/unnecessary_iter_cloned.rs:47:22
|
LL | for (t, path) in files.iter().copied() {
| ^^^^^^^^^^^^^^^^^^^^^
|
help: remove any references to the binding
|
LL ~ for (t, path) in files.iter() {
LL |
LL ~ let other = match get_file_path(t) {
|
thread 'rustc' panicked at /checkout/compiler/rustc_errors/src/diagnostic.rs:926:9:
assertion `left == right` failed: Span must not be empty and have no suggestion
left: Some(SubstitutionPart { span: tests/ui/unnecessary_iter_cloned.rs:182:24: 182:24 (#0), snippet: "" })
right: None
stack backtrace:
0: 0x7fa6fdedbe60 - <<std[722de03b977f82e2]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[b85b81897dd7c607]::fmt::Display>::fmt
1: 0x7fa6fdf383bf - core[b85b81897dd7c607]::fmt::write
2: 0x7fa6fdeced49 - <std[722de03b977f82e2]::sys::stdio::unix::Stderr as std[722de03b977f82e2]::io::Write>::write_fmt
3: 0x7fa6fdedbd02 - <std[722de03b977f82e2]::sys::backtrace::BacktraceLock>::print
4: 0x7fa6fdee0508 - std[722de03b977f82e2]::panicking::default_hook::{closure#0}
5: 0x7fa6fdee02a2 - std[722de03b977f82e2]::panicking::default_hook
6: 0x7fa6f949af22 - <alloc[8f667485acfd4fc8]::boxed::Box<rustc_driver_impl[5c0983139a933bca]::install_ice_hook::{closure#1}> as core[b85b81897dd7c607]::ops::function::Fn<(&dyn for<'a, 'b> core[b85b81897dd7c607]::ops::function::Fn<(&'a std[722de03b977f82e2]::panic::PanicHookInfo<'b>,), Output = ()> + core[b85b81897dd7c607]:📑:Sync + core[b85b81897dd7c607]:📑:Send, &std[722de03b977f82e2]::panic::PanicHookInfo)>>::call
7: 0x7fa6fdee117b - std[722de03b977f82e2]::panicking::rust_panic_with_hook
8: 0x7fa6fdee0d7e - std[722de03b977f82e2]::panicking::begin_panic_handler::{closure#0}
9: 0x7fa6fdedc479 - std[722de03b977f82e2]::sys::backtrace::__rust_end_short_backtrace::<std[722de03b977f82e2]::panicking::begin_panic_handler::{closure#0}, !>
10: 0x7fa6fdee098d - __rustc[210dc653f36a8667]::rust_begin_unwind
11: 0x7fa6fdf34000 - core[b85b81897dd7c607]::panicking::panic_fmt
12: 0x7fa6fdf3456a - core[b85b81897dd7c607]::panicking::assert_failed_inner
13: 0x7fa6fd6e3a8f - core[b85b81897dd7c607]::panicking::assert_failed::<core[b85b81897dd7c607]::option::Option<&rustc_errors[8c94111977c95880]::SubstitutionPart>, core[b85b81897dd7c607]::option::Option<&rustc_errors[8c94111977c95880]::SubstitutionPart>>
14: 0x55edf21c8999 - <rustc_errors[8c94111977c95880]::diagnostic::Diag<()>>::multipart_suggestion_with_style::<&str>
15: 0x55edf23af504 - <clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, alloc[8f667485acfd4fc8]:🧵:String, clippy_lints[2d5f372497376e35]::methods::unnecessary_iter_cloned::check_for_loop_iter::{closure#1}>::{closure#0} as core[b85b81897dd7c607]::ops::function::FnOnce<(&mut rustc_errors[8c94111977c95880]::diagnostic::Diag<()>,)>>::call_once::{shim:vtable#0}
16: 0x7fa6fd7158b3 - rustc_middle[4a64cfee706b595]::lint::lint_level::lint_level_impl
17: 0x55edf237a38a - rustc_middle[4a64cfee706b595]::lint::lint_level::<clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, alloc[8f667485acfd4fc8]:🧵:String, clippy_lints[2d5f372497376e35]::methods::unnecessary_iter_cloned::check_for_loop_iter::{closure#1}>::{closure#0}>
18: 0x55edf2392cc1 - <rustc_lint[96dc6baabd10bd4e]::context::LateContext as rustc_lint[96dc6baabd10bd4e]::context::LintContext>::opt_span_lint::<rustc_span[5de9bfc504d26a6f]::span_encoding::Span, clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, alloc[8f667485acfd4fc8]:🧵:String, clippy_lints[2d5f372497376e35]::methods::unnecessary_iter_cloned::check_for_loop_iter::{closure#1}>::{closure#0}>
19: 0x55edf2202f93 - clippy_lints[2d5f372497376e35]::methods::unnecessary_iter_cloned::check_for_loop_iter
20: 0x55edf2462d87 - <clippy_lints[2d5f372497376e35]::methods::Methods as rustc_lint[96dc6baabd10bd4e]::passes::LateLintPass>::check_expr
21: 0x7fa6fbdfe513 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
22: 0x7fa6fbed38fb - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
23: 0x7fa6fbdfe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
24: 0x7fa6fbed2e1e - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
25: 0x7fa6fbdfe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
26: 0x7fa6fbed337f - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
27: 0x7fa6fbdfe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
28: 0x7fa6fbe02582 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_block
29: 0x7fa6fbdfe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
30: 0x7fa6fbdfc724 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_body
31: 0x7fa6fbdffae9 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_fn
32: 0x7fa6fbed6323 - rustc_hir[a97542dc954c1f22]::intravisit::walk_item::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
33: 0x7fa6fbdf3de4 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_item
34: 0x7fa6fbe0163c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_mod
35: 0x7fa6fbdf3de4 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_item
36: 0x7fa6fbe0163c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_mod
37: 0x7fa6fbe05531 - rustc_lint[96dc6baabd10bd4e]::late::late_lint_crate
38: 0x7fa6fbd8dbce - rustc_data_structures[6b0c338be68cbdf0]::sync::parallel::serial_join::<rustc_lint[96dc6baabd10bd4e]::late::check_crate::{closure#0}, rustc_lint[96dc6baabd10bd4e]::late::check_crate::{closure#1}, (), ()>
39: 0x7fa6fbe05b7b - rustc_lint[96dc6baabd10bd4e]::late::check_crate
40: 0x7fa6f96d3fe3 - <rustc_data_structures[6b0c338be68cbdf0]::sync::parallel::ParallelGuard>::run::<(), rustc_interface[7e2780b9127a51f3]::passes::analysis::{closure#0}::{closure#1}::{closure#0}>
41: 0x7fa6f9891c51 - <rustc_session[1697b6e1c1bf6b08]::session::Session>::time::<(), rustc_interface[7e2780b9127a51f3]::passes::analysis::{closure#0}>
42: 0x7fa6f9820bf2 - rustc_interface[7e2780b9127a51f3]::passes::analysis
43: 0x7fa6fc1821f3 - rustc_query_impl[296c58625f4e3441]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[296c58625f4e3441]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4a64cfee706b595]::query::erase::Erased<[u8; 0usize]>>
44: 0x7fa6fc0aa0d1 - <rustc_query_impl[296c58625f4e3441]::query_impl::analysis::dynamic_query::{closure#2} as core[b85b81897dd7c607]::ops::function::FnOnce<(rustc_middle[4a64cfee706b595]::ty::context::TyCtxt, ())>>::call_once
45: 0x7fa6fbf70269 - rustc_query_system[e31d6d9fbccfd6f2]::query::plumbing::try_execute_query::<rustc_query_impl[296c58625f4e3441]::DynamicConfig<rustc_query_system[e31d6d9fbccfd6f2]::query::caches::SingleCache<rustc_middle[4a64cfee706b595]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[296c58625f4e3441]::plumbing::QueryCtxt, false>
46: 0x7fa6fc2785d2 - rustc_query_impl[296c58625f4e3441]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
47: 0x7fa6f942e833 - <std[722de03b977f82e2]::thread::local::LocalKey<core[b85b81897dd7c607]::cell::Cell<*const ()>>>::with::<rustc_middle[4a64cfee706b595]::ty::context::tls::enter_context<<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>::enter<rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>::{closure#1}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>::{closure#0}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>
48: 0x7fa6f944b072 - <rustc_middle[4a64cfee706b595]::ty::context::TyCtxt>::create_global_ctxt::<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
49: 0x7fa6f942ae46 - <rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[b85b81897dd7c607]::ops::function::FnOnce<(&rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
50: 0x7fa6f949a2b6 - <alloc[8f667485acfd4fc8]::boxed::Box<dyn for<'a> core[b85b81897dd7c607]::ops::function::FnOnce<(&'a rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &'a std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena<'a>>, &'a rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena<'a>>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}), Output = core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>> as core[b85b81897dd7c607]::ops::function::FnOnce<(&rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2})>>::call_once
51: 0x7fa6f94087e7 - rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt::<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>
52: 0x7fa6f93a2a69 - rustc_span[5de9bfc504d26a6f]::create_session_globals_then::<(), rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
53: 0x7fa6f93c3dd9 - std[722de03b977f82e2]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
54: 0x7fa6f93c6e44 - <<std[722de03b977f82e2]::thread::Builder>::spawn_unchecked_<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[b85b81897dd7c607]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
55: 0x7fa6fdee4aa5 - <std[722de03b977f82e2]::sys::pal::unix::thread::Thread>:🆕:thread_start
56: 0x7fa6f706bac3 - <unknown>
57: 0x7fa6f70fd850 - <unknown>
58: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml
note: please make sure that you have updated to the latest nightly
note: rustc 1.88.0-nightly (7ab5976f9 2025-05-07) running on x86_64-unknown-linux-gnu
---
FAILED TEST: tests/ui/unnecessary_path_debug_formatting.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-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/stage1-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-2c93a398ed1b3bf2.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-dd1f7a63ab09d2c0.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-04d95fc1b4230011.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-6d7a81bc2763ac5f.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-d494e6b7c1a6e89b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-d4e4179d28fd4b4c.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-c60316d1e8e896b7.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libquote-07dd62da2c3e7a6e.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libregex-75c78277780d7d9c.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cc2bae94717512c6.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9431a02aee605a39.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-1cf89851da371bc7.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-ab47290081742c1b.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps" "--test" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/ui_test/0/tests/ui" "tests/ui/unnecessary_path_debug_formatting.rs" "--edition" "2024"
error: actual output differed from expected
Execute `./x test src/tools/clippy --bless` to update `tests/ui/unnecessary_path_debug_formatting.stderr` to the actual output
--- tests/ui/unnecessary_path_debug_formatting.stderr
+++ <stderr output>
error: unnecessary `Debug` formatting in `println!` args
- --> tests/ui/unnecessary_path_debug_formatting.rs:30:22
- |
-LL | println!("{:?}", os_str);
- | ^^^^^^
- |
- = help: use `Display` formatting and change this to `os_str.display()`
- = note: switching to `Display` formatting will change how the value is shown; escaped characters will no longer be escaped and surrounding quotes will be removed
- = note: `-D clippy::unnecessary-debug-formatting` implied by `-D warnings`
- = help: to override `-D warnings` add `#[allow(clippy::unnecessary_debug_formatting)]`
-
-error: unnecessary `Debug` formatting in `println!` args
- --> tests/ui/unnecessary_path_debug_formatting.rs:31:22
- |
-LL | println!("{:?}", os_string);
- | ^^^^^^^^^
- |
- = help: use `Display` formatting and change this to `os_string.display()`
- = note: switching to `Display` formatting will change how the value is shown; escaped characters will no longer be escaped and surrounding quotes will be removed
-
-error: unnecessary `Debug` formatting in `println!` args
- --> tests/ui/unnecessary_path_debug_formatting.rs:33:22
- |
-LL | println!("{:?}", path);
- | ^^^^
- |
- = help: use `Display` formatting and change this to `path.display()`
- = note: switching to `Display` formatting will change how the value is shown; escaped characters will no longer be escaped and surrounding quotes will be removed
-
-error: unnecessary `Debug` formatting in `println!` args
- --> tests/ui/unnecessary_path_debug_formatting.rs:34:22
- |
-LL | println!("{:?}", path_buf);
- | ^^^^^^^^
- |
- = help: use `Display` formatting and change this to `path_buf.display()`
- = note: switching to `Display` formatting will change how the value is shown; escaped characters will no longer be escaped and surrounding quotes will be removed
-
-error: unnecessary `Debug` formatting in `println!` args
- --> tests/ui/unnecessary_path_debug_formatting.rs:36:16
- |
-LL | println!("{path:?}");
- | ^^^^
- |
- = help: use `Display` formatting and change this to `path.display()`
- = note: switching to `Display` formatting will change how the value is shown; escaped characters will no longer be escaped and surrounding quotes will be removed
-
-error: unnecessary `Debug` formatting in `println!` args
- --> tests/ui/unnecessary_path_debug_formatting.rs:37:16
- |
-LL | println!("{path_buf:?}");
- | ^^^^^^^^
- |
- = help: use `Display` formatting and change this to `path_buf.display()`
- = note: switching to `Display` formatting will change how the value is shown; escaped characters will no longer be escaped and surrounding quotes will be removed
-
-error: unnecessary `Debug` formatting in `format!` args
- --> tests/ui/unnecessary_path_debug_formatting.rs:39:37
- |
-LL | let _: String = format!("{:?}", path);
- | ^^^^
- |
- = help: use `Display` formatting and change this to `path.display()`
- = note: switching to `Display` formatting will change how the value is shown; escaped characters will no longer be escaped and surrounding quotes will be removed
-
-error: unnecessary `Debug` formatting in `format!` args
- --> tests/ui/unnecessary_path_debug_formatting.rs:40:37
- |
-LL | let _: String = format!("{:?}", path_buf);
- | ^^^^^^^^
- |
- = help: use `Display` formatting and change this to `path_buf.display()`
- = note: switching to `Display` formatting will change how the value is shown; escaped characters will no longer be escaped and surrounding quotes will be removed
-
-error: unnecessary `Debug` formatting in `println!` args
--> tests/ui/unnecessary_path_debug_formatting.rs:43:22
|
... 3 lines skipped ...
= help: use `Display` formatting and change this to `&*deref_path.display()`
= note: switching to `Display` formatting will change how the value is shown; escaped characters will no longer be escaped and surrounding quotes will be removed
+ = note: `-D clippy::unnecessary-debug-formatting` implied by `-D warnings`
+ = help: to override `-D warnings` add `#[allow(clippy::unnecessary_debug_formatting)]`
-error: aborting due to 9 previous errors
+error: aborting due to 1 previous error
Full unnormalized output:
error: unnecessary `Debug` formatting in `println!` args
##[error] --> tests/ui/unnecessary_path_debug_formatting.rs:43:22
|
LL | println!("{:?}", &*deref_path);
| ^^^^^^^^^^^^
|
= help: use `Display` formatting and change this to `&*deref_path.display()`
= note: switching to `Display` formatting will change how the value is shown; escaped characters will no longer be escaped and surrounding quotes will be removed
= note: `-D clippy::unnecessary-debug-formatting` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_debug_formatting)]`
error: aborting due to 1 previous error
---
error: diagnostic code `clippy::unnecessary_debug_formatting` not found on line 33
##[error] --> tests/ui/unnecessary_path_debug_formatting.rs:33:33
|
33 | println!("{:?}", path); //~ unnecessary_debug_formatting
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
|
error: diagnostic code `clippy::unnecessary_debug_formatting` not found on line 34
##[error] --> tests/ui/unnecessary_path_debug_formatting.rs:34:37
|
34 | println!("{:?}", path_buf); //~ unnecessary_debug_formatting
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
|
error: diagnostic code `clippy::unnecessary_debug_formatting` not found on line 36
##[error] --> tests/ui/unnecessary_path_debug_formatting.rs:36:31
|
36 | println!("{path:?}"); //~ unnecessary_debug_formatting
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
|
error: diagnostic code `clippy::unnecessary_debug_formatting` not found on line 37
##[error] --> tests/ui/unnecessary_path_debug_formatting.rs:37:35
|
37 | println!("{path_buf:?}"); //~ unnecessary_debug_formatting
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
|
error: diagnostic code `clippy::unnecessary_debug_formatting` not found on line 39
##[error] --> tests/ui/unnecessary_path_debug_formatting.rs:39:48
|
39 | let _: String = format!("{:?}", path); //~ unnecessary_debug_formatting
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
|
error: diagnostic code `clippy::unnecessary_debug_formatting` not found on line 40
##[error] --> tests/ui/unnecessary_path_debug_formatting.rs:40:52
|
40 | let _: String = format!("{:?}", path_buf); //~ unnecessary_debug_formatting
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected because of this pattern
|
full stderr:
error: unnecessary `Debug` formatting in `println!` args
##[error] --> tests/ui/unnecessary_path_debug_formatting.rs:43:22
|
LL | println!("{:?}", &*deref_path);
| ^^^^^^^^^^^^
|
= help: use `Display` formatting and change this to `&*deref_path.display()`
= note: switching to `Display` formatting will change how the value is shown; escaped characters will no longer be escaped and surrounding quotes will be removed
= note: `-D clippy::unnecessary-debug-formatting` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_debug_formatting)]`
error: aborting due to 1 previous error
full stdout:
FAILED TEST: tests/ui/author/macro_in_closure.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-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/stage1-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-2c93a398ed1b3bf2.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-dd1f7a63ab09d2c0.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-04d95fc1b4230011.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-6d7a81bc2763ac5f.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-d494e6b7c1a6e89b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-d4e4179d28fd4b4c.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-c60316d1e8e896b7.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libquote-07dd62da2c3e7a6e.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libregex-75c78277780d7d9c.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cc2bae94717512c6.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9431a02aee605a39.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-1cf89851da371bc7.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-ab47290081742c1b.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/ui_test/0/tests/ui/author" "tests/ui/author/macro_in_closure.rs" "--edition" "2024"
error: actual output differed from expected
Execute `./x test src/tools/clippy --bless` to update `tests/ui/author/macro_in_closure.stdout` to the actual output
--- tests/ui/author/macro_in_closure.stdout
+++ <stdout output>
if let StmtKind::Let(local) = stmt.kind
&& let Some(init) = local.init
... 8 lines skipped ...
&& match_qpath(qpath, &["$crate", "io", "_print"])
&& args.len() == 1
- && let ExprKind::Call(func1, args1) = args[0].kind
+ && let ExprKind::Block(block1, None) = args[0].kind
+ && block1.stmts.len() == 1
+ && let StmtKind::Let(local1) = block1.stmts[0].kind
+ && let Some(init1) = local1.init
+ && let ExprKind::Array(elements) = init1.kind
+ && elements.len() == 1
+ && let ExprKind::Call(func1, args1) = elements[0].kind
&& let ExprKind::Path(ref qpath1) = func1.kind
- && match_qpath(qpath1, &["format_arguments", "new_v1"])
+ && match_qpath(qpath1, &["format_argument", "new_display"])
- && args1.len() == 2
+ && args1.len() == 1
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = args1[0].kind
- && let ExprKind::Array(elements) = inner.kind
- && elements.len() == 2
- && let ExprKind::Lit(ref lit) = elements[0].kind
+ && let ExprKind::Path(ref qpath2) = inner.kind
+ && match_qpath(qpath2, &["x"])
+ && let PatKind::Binding(BindingMode::NONE, _, name, None) = local1.pat.kind
+ && name.as_str() == "args"
+ && let Some(trailing_expr) = block1.expr
+ && let ExprKind::Call(func2, args2) = trailing_expr.kind
+ && let ExprKind::Path(ref qpath3) = func2.kind
+ && match_qpath(qpath3, &["format_arguments", "new_v1"])
+ && args2.len() == 2
+ && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner1) = args2[0].kind
+ && let ExprKind::Array(elements1) = inner1.kind
+ && elements1.len() == 2
+ && let ExprKind::Lit(ref lit) = elements1[0].kind
&& let LitKind::Str(s, _) = lit.node
&& s.as_str() == ""
- && let ExprKind::Lit(ref lit1) = elements[1].kind
+ && let ExprKind::Lit(ref lit1) = elements1[1].kind
&& let LitKind::Str(s1, _) = lit1.node
&& s1.as_str() == "\n"
- && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner1) = args1[1].kind
- && let ExprKind::Array(elements1) = inner1.kind
- && elements1.len() == 1
- && let ExprKind::Call(func2, args2) = elements1[0].kind
- && let ExprKind::Path(ref qpath2) = func2.kind
- && match_qpath(qpath2, &["format_argument", "new_display"])
- && args2.len() == 1
- && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[0].kind
- && let ExprKind::Path(ref qpath3) = inner2.kind
- && match_qpath(qpath3, &["x"])
+ && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[1].kind
+ && let ExprKind::Path(ref qpath4) = inner2.kind
+ && match_qpath(qpath4, &["args"])
&& block.expr.is_none()
- && let PatKind::Binding(BindingMode::NONE, _, name, None) = local.pat.kind
+ && let PatKind::Binding(BindingMode::NONE, _, name1, None) = local.pat.kind
- && name.as_str() == "print_text"
+ && name1.as_str() == "print_text"
{
// report your lint here
}
Full unnormalized output:
if let StmtKind::Let(local) = stmt.kind
&& let Some(init) = local.init
&& let ExprKind::Closure { capture_clause: CaptureBy::Ref, fn_decl: fn_decl, body: body_id, closure_kind: ClosureKind::Closure, .. } = init.kind
&& let FnRetTy::DefaultReturn(_) = fn_decl.output
&& expr = &cx.tcx.hir_body(body_id).value
&& let ExprKind::Block(block, None) = expr.kind
&& block.stmts.len() == 1
&& let StmtKind::Semi(e) = block.stmts[0].kind
&& let ExprKind::Call(func, args) = e.kind
&& let ExprKind::Path(ref qpath) = func.kind
&& match_qpath(qpath, &["$crate", "io", "_print"])
&& args.len() == 1
&& let ExprKind::Block(block1, None) = args[0].kind
&& block1.stmts.len() == 1
&& let StmtKind::Let(local1) = block1.stmts[0].kind
&& let Some(init1) = local1.init
&& let ExprKind::Array(elements) = init1.kind
&& elements.len() == 1
&& let ExprKind::Call(func1, args1) = elements[0].kind
&& let ExprKind::Path(ref qpath1) = func1.kind
&& match_qpath(qpath1, &["format_argument", "new_display"])
&& args1.len() == 1
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = args1[0].kind
&& let ExprKind::Path(ref qpath2) = inner.kind
&& match_qpath(qpath2, &["x"])
&& let PatKind::Binding(BindingMode::NONE, _, name, None) = local1.pat.kind
&& name.as_str() == "args"
&& let Some(trailing_expr) = block1.expr
&& let ExprKind::Call(func2, args2) = trailing_expr.kind
&& let ExprKind::Path(ref qpath3) = func2.kind
&& match_qpath(qpath3, &["format_arguments", "new_v1"])
&& args2.len() == 2
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner1) = args2[0].kind
&& let ExprKind::Array(elements1) = inner1.kind
&& elements1.len() == 2
&& let ExprKind::Lit(ref lit) = elements1[0].kind
&& let LitKind::Str(s, _) = lit.node
&& s.as_str() == ""
&& let ExprKind::Lit(ref lit1) = elements1[1].kind
&& let LitKind::Str(s1, _) = lit1.node
&& s1.as_str() == "\n"
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[1].kind
&& let ExprKind::Path(ref qpath4) = inner2.kind
&& match_qpath(qpath4, &["args"])
&& block.expr.is_none()
&& let PatKind::Binding(BindingMode::NONE, _, name1, None) = local.pat.kind
&& name1.as_str() == "print_text"
{
// report your lint here
}
full stderr:
full stdout:
if let StmtKind::Let(local) = stmt.kind
&& let Some(init) = local.init
&& let ExprKind::Closure { capture_clause: CaptureBy::Ref, fn_decl: fn_decl, body: body_id, closure_kind: ClosureKind::Closure, .. } = init.kind
&& let FnRetTy::DefaultReturn(_) = fn_decl.output
&& expr = &cx.tcx.hir_body(body_id).value
&& let ExprKind::Block(block, None) = expr.kind
&& block.stmts.len() == 1
&& let StmtKind::Semi(e) = block.stmts[0].kind
&& let ExprKind::Call(func, args) = e.kind
&& let ExprKind::Path(ref qpath) = func.kind
&& match_qpath(qpath, &["$crate", "io", "_print"])
&& args.len() == 1
&& let ExprKind::Block(block1, None) = args[0].kind
&& block1.stmts.len() == 1
&& let StmtKind::Let(local1) = block1.stmts[0].kind
&& let Some(init1) = local1.init
&& let ExprKind::Array(elements) = init1.kind
&& elements.len() == 1
&& let ExprKind::Call(func1, args1) = elements[0].kind
&& let ExprKind::Path(ref qpath1) = func1.kind
&& match_qpath(qpath1, &["format_argument", "new_display"])
&& args1.len() == 1
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = args1[0].kind
&& let ExprKind::Path(ref qpath2) = inner.kind
&& match_qpath(qpath2, &["x"])
&& let PatKind::Binding(BindingMode::NONE, _, name, None) = local1.pat.kind
&& name.as_str() == "args"
&& let Some(trailing_expr) = block1.expr
&& let ExprKind::Call(func2, args2) = trailing_expr.kind
&& let ExprKind::Path(ref qpath3) = func2.kind
&& match_qpath(qpath3, &["format_arguments", "new_v1"])
&& args2.len() == 2
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner1) = args2[0].kind
&& let ExprKind::Array(elements1) = inner1.kind
&& elements1.len() == 2
&& let ExprKind::Lit(ref lit) = elements1[0].kind
&& let LitKind::Str(s, _) = lit.node
&& s.as_str() == ""
&& let ExprKind::Lit(ref lit1) = elements1[1].kind
&& let LitKind::Str(s1, _) = lit1.node
&& s1.as_str() == "\n"
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[1].kind
&& let ExprKind::Path(ref qpath4) = inner2.kind
&& match_qpath(qpath4, &["args"])
&& block.expr.is_none()
&& let PatKind::Binding(BindingMode::NONE, _, name1, None) = local.pat.kind
&& name1.as_str() == "print_text"
{
// report your lint here
}
FAILED TEST: tests/ui/author/macro_in_loop.rs
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-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/stage1-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-2c93a398ed1b3bf2.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-dd1f7a63ab09d2c0.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-04d95fc1b4230011.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-6d7a81bc2763ac5f.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-d494e6b7c1a6e89b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-d4e4179d28fd4b4c.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-c60316d1e8e896b7.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libquote-07dd62da2c3e7a6e.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libregex-75c78277780d7d9c.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cc2bae94717512c6.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9431a02aee605a39.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-1cf89851da371bc7.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-ab47290081742c1b.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/ui_test/0/tests/ui/author" "tests/ui/author/macro_in_loop.rs" "--edition" "2024"
error: actual output differed from expected
Execute `./x test src/tools/clippy --bless` to update `tests/ui/author/macro_in_loop.stdout` to the actual output
--- tests/ui/author/macro_in_loop.stdout
+++ <stdout output>
if let Some(higher::ForLoop { pat: pat, arg: arg, body: body, .. }) = higher::ForLoop::hir(expr)
&& let PatKind::Binding(BindingMode::NONE, _, name, None) = pat.kind
... 18 lines skipped ...
&& match_qpath(qpath1, &["$crate", "io", "_print"])
&& args.len() == 1
- && let ExprKind::Call(func1, args1) = args[0].kind
+ && let ExprKind::Block(block2, None) = args[0].kind
+ && block2.stmts.len() == 1
+ && let StmtKind::Let(local) = block2.stmts[0].kind
+ && let Some(init) = local.init
+ && let ExprKind::Array(elements) = init.kind
+ && elements.len() == 1
+ && let ExprKind::Call(func1, args1) = elements[0].kind
&& let ExprKind::Path(ref qpath2) = func1.kind
- && match_qpath(qpath2, &["format_arguments", "new_v1"])
+ && match_qpath(qpath2, &["format_argument", "new_display"])
- && args1.len() == 2
+ && args1.len() == 1
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = args1[0].kind
- && let ExprKind::Array(elements) = inner.kind
- && elements.len() == 2
- && let ExprKind::Lit(ref lit2) = elements[0].kind
+ && let ExprKind::Path(ref qpath3) = inner.kind
+ && match_qpath(qpath3, &["i"])
+ && let PatKind::Binding(BindingMode::NONE, _, name1, None) = local.pat.kind
+ && name1.as_str() == "args"
+ && let Some(trailing_expr) = block2.expr
+ && let ExprKind::Call(func2, args2) = trailing_expr.kind
+ && let ExprKind::Path(ref qpath4) = func2.kind
+ && match_qpath(qpath4, &["format_arguments", "new_v1"])
+ && args2.len() == 2
+ && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner1) = args2[0].kind
+ && let ExprKind::Array(elements1) = inner1.kind
+ && elements1.len() == 2
+ && let ExprKind::Lit(ref lit2) = elements1[0].kind
&& let LitKind::Str(s, _) = lit2.node
&& s.as_str() == ""
- && let ExprKind::Lit(ref lit3) = elements[1].kind
+ && let ExprKind::Lit(ref lit3) = elements1[1].kind
&& let LitKind::Str(s1, _) = lit3.node
&& s1.as_str() == "\n"
- && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner1) = args1[1].kind
- && let ExprKind::Array(elements1) = inner1.kind
- && elements1.len() == 1
- && let ExprKind::Call(func2, args2) = elements1[0].kind
- && let ExprKind::Path(ref qpath3) = func2.kind
- && match_qpath(qpath3, &["format_argument", "new_display"])
- && args2.len() == 1
- && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[0].kind
- && let ExprKind::Path(ref qpath4) = inner2.kind
- && match_qpath(qpath4, &["i"])
+ && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[1].kind
+ && let ExprKind::Path(ref qpath5) = inner2.kind
+ && match_qpath(qpath5, &["args"])
&& block1.expr.is_none()
&& block.expr.is_none()
{
// report your lint here
}
Full unnormalized output:
if let Some(higher::ForLoop { pat: pat, arg: arg, body: body, .. }) = higher::ForLoop::hir(expr)
&& let PatKind::Binding(BindingMode::NONE, _, name, None) = pat.kind
&& name.as_str() == "i"
&& let ExprKind::Struct(qpath, fields, None) = arg.kind
&& matches!(qpath, QPath::LangItem(LangItem::Range, _))
&& fields.len() == 2
&& fields[0].ident.as_str() == "start"
&& let ExprKind::Lit(ref lit) = fields[0].expr.kind
&& let LitKind::Int(0, LitIntType::Unsuffixed) = lit.node
&& fields[1].ident.as_str() == "end"
&& let ExprKind::Lit(ref lit1) = fields[1].expr.kind
&& let LitKind::Int(1, LitIntType::Unsuffixed) = lit1.node
&& let ExprKind::Block(block, None) = body.kind
&& block.stmts.len() == 1
&& let StmtKind::Semi(e) = block.stmts[0].kind
&& let ExprKind::Block(block1, None) = e.kind
&& block1.stmts.len() == 1
&& let StmtKind::Semi(e1) = block1.stmts[0].kind
&& let ExprKind::Call(func, args) = e1.kind
&& let ExprKind::Path(ref qpath1) = func.kind
&& match_qpath(qpath1, &["$crate", "io", "_print"])
&& args.len() == 1
&& let ExprKind::Block(block2, None) = args[0].kind
&& block2.stmts.len() == 1
&& let StmtKind::Let(local) = block2.stmts[0].kind
&& let Some(init) = local.init
&& let ExprKind::Array(elements) = init.kind
&& elements.len() == 1
&& let ExprKind::Call(func1, args1) = elements[0].kind
&& let ExprKind::Path(ref qpath2) = func1.kind
&& match_qpath(qpath2, &["format_argument", "new_display"])
&& args1.len() == 1
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = args1[0].kind
&& let ExprKind::Path(ref qpath3) = inner.kind
&& match_qpath(qpath3, &["i"])
&& let PatKind::Binding(BindingMode::NONE, _, name1, None) = local.pat.kind
&& name1.as_str() == "args"
&& let Some(trailing_expr) = block2.expr
&& let ExprKind::Call(func2, args2) = trailing_expr.kind
&& let ExprKind::Path(ref qpath4) = func2.kind
&& match_qpath(qpath4, &["format_arguments", "new_v1"])
&& args2.len() == 2
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner1) = args2[0].kind
&& let ExprKind::Array(elements1) = inner1.kind
&& elements1.len() == 2
&& let ExprKind::Lit(ref lit2) = elements1[0].kind
&& let LitKind::Str(s, _) = lit2.node
&& s.as_str() == ""
&& let ExprKind::Lit(ref lit3) = elements1[1].kind
&& let LitKind::Str(s1, _) = lit3.node
&& s1.as_str() == "\n"
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[1].kind
&& let ExprKind::Path(ref qpath5) = inner2.kind
&& match_qpath(qpath5, &["args"])
&& block1.expr.is_none()
&& block.expr.is_none()
{
// report your lint here
}
full stderr:
full stdout:
if let Some(higher::ForLoop { pat: pat, arg: arg, body: body, .. }) = higher::ForLoop::hir(expr)
&& let PatKind::Binding(BindingMode::NONE, _, name, None) = pat.kind
&& name.as_str() == "i"
&& let ExprKind::Struct(qpath, fields, None) = arg.kind
&& matches!(qpath, QPath::LangItem(LangItem::Range, _))
&& fields.len() == 2
&& fields[0].ident.as_str() == "start"
&& let ExprKind::Lit(ref lit) = fields[0].expr.kind
&& let LitKind::Int(0, LitIntType::Unsuffixed) = lit.node
&& fields[1].ident.as_str() == "end"
&& let ExprKind::Lit(ref lit1) = fields[1].expr.kind
&& let LitKind::Int(1, LitIntType::Unsuffixed) = lit1.node
&& let ExprKind::Block(block, None) = body.kind
&& block.stmts.len() == 1
&& let StmtKind::Semi(e) = block.stmts[0].kind
&& let ExprKind::Block(block1, None) = e.kind
&& block1.stmts.len() == 1
&& let StmtKind::Semi(e1) = block1.stmts[0].kind
&& let ExprKind::Call(func, args) = e1.kind
&& let ExprKind::Path(ref qpath1) = func.kind
&& match_qpath(qpath1, &["$crate", "io", "_print"])
&& args.len() == 1
&& let ExprKind::Block(block2, None) = args[0].kind
&& block2.stmts.len() == 1
&& let StmtKind::Let(local) = block2.stmts[0].kind
&& let Some(init) = local.init
&& let ExprKind::Array(elements) = init.kind
&& elements.len() == 1
&& let ExprKind::Call(func1, args1) = elements[0].kind
&& let ExprKind::Path(ref qpath2) = func1.kind
&& match_qpath(qpath2, &["format_argument", "new_display"])
&& args1.len() == 1
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = args1[0].kind
&& let ExprKind::Path(ref qpath3) = inner.kind
&& match_qpath(qpath3, &["i"])
&& let PatKind::Binding(BindingMode::NONE, _, name1, None) = local.pat.kind
&& name1.as_str() == "args"
&& let Some(trailing_expr) = block2.expr
&& let ExprKind::Call(func2, args2) = trailing_expr.kind
&& let ExprKind::Path(ref qpath4) = func2.kind
&& match_qpath(qpath4, &["format_arguments", "new_v1"])
&& args2.len() == 2
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner1) = args2[0].kind
&& let ExprKind::Array(elements1) = inner1.kind
&& elements1.len() == 2
&& let ExprKind::Lit(ref lit2) = elements1[0].kind
&& let LitKind::Str(s, _) = lit2.node
&& s.as_str() == ""
&& let ExprKind::Lit(ref lit3) = elements1[1].kind
&& let LitKind::Str(s1, _) = lit3.node
&& s1.as_str() == "\n"
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[1].kind
&& let ExprKind::Path(ref qpath5) = inner2.kind
&& match_qpath(qpath5, &["args"])
&& block1.expr.is_none()
&& block.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/stage1-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/stage1-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-2c93a398ed1b3bf2.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-dd1f7a63ab09d2c0.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-04d95fc1b4230011.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-6d7a81bc2763ac5f.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-d494e6b7c1a6e89b.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-d4e4179d28fd4b4c.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-c60316d1e8e896b7.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libquote-07dd62da2c3e7a6e.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libregex-75c78277780d7d9c.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libserde-cc2bae94717512c6.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-9431a02aee605a39.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-1cf89851da371bc7.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-ab47290081742c1b.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps" "--test" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/ui_test/0/tests/ui/dbg_macro" "tests/ui/dbg_macro/dbg_macro.rs" "--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: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
- --> 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' panicked at src/tools/clippy/clippy_lints/src/dbg_macro.rs:118:30:
+internal error: entered unreachable code
+stack backtrace:
+ 0: 0x7ff58d6dbe60 - <<std[722de03b977f82e2]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[b85b81897dd7c607]::fmt::Display>::fmt
+ 1: 0x7ff58d7383bf - core[b85b81897dd7c607]::fmt::write
+ 2: 0x7ff58d6ced49 - <std[722de03b977f82e2]::sys::stdio::unix::Stderr as std[722de03b977f82e2]::io::Write>::write_fmt
+ 3: 0x7ff58d6dbd02 - <std[722de03b977f82e2]::sys::backtrace::BacktraceLock>::print
+ 4: 0x7ff58d6e0508 - std[722de03b977f82e2]::panicking::default_hook::{closure#0}
+ 5: 0x7ff58d6e02a2 - std[722de03b977f82e2]::panicking::default_hook
+ 6: 0x7ff588c9af22 - <alloc[8f667485acfd4fc8]::boxed::Box<rustc_driver_impl[5c0983139a933bca]::install_ice_hook::{closure#1}> as core[b85b81897dd7c607]::ops::function::Fn<(&dyn for<'a, 'b> core[b85b81897dd7c607]::ops::function::Fn<(&'a std[722de03b977f82e2]::panic::PanicHookInfo<'b>,), Output = ()> + core[b85b81897dd7c607]:📑:Sync + core[b85b81897dd7c607]:📑:Send, &std[722de03b977f82e2]::panic::PanicHookInfo)>>::call
+ 7: 0x7ff58d6e117b - std[722de03b977f82e2]::panicking::rust_panic_with_hook
+ 8: 0x7ff58d6e0d4a - std[722de03b977f82e2]::panicking::begin_panic_handler::{closure#0}
+ 9: 0x7ff58d6dc479 - std[722de03b977f82e2]::sys::backtrace::__rust_end_short_backtrace::<std[722de03b977f82e2]::panicking::begin_panic_handler::{closure#0}, !>
+ 10: 0x7ff58d6e098d - __rustc[210dc653f36a8667]::rust_begin_unwind
+ 11: 0x7ff58d734000 - core[b85b81897dd7c607]::panicking::panic_fmt
+ 12: 0x7ff58d73408c - core[b85b81897dd7c607]::panicking::panic
+ 13: 0x55b4249a17c7 - <clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, &str, <clippy_lints[2d5f372497376e35]::dbg_macro::DbgMacro as rustc_lint[96dc6baabd10bd4e]::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0} as core[b85b81897dd7c607]::ops::function::FnOnce<(&mut rustc_errors[8c94111977c95880]::diagnostic::Diag<()>,)>>::call_once::{shim:vtable#0}
+ 14: 0x7ff58cf158b3 - rustc_middle[4a64cfee706b595]::lint::lint_level::lint_level_impl
+ 15: 0x55b424956d86 - rustc_middle[4a64cfee706b595]::lint::lint_level::<clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, &str, <clippy_lints[2d5f372497376e35]::dbg_macro::DbgMacro as rustc_lint[96dc6baabd10bd4e]::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}>
+ 16: 0x55b42496afbc - <rustc_lint[96dc6baabd10bd4e]::context::LateContext as rustc_lint[96dc6baabd10bd4e]::context::LintContext>::opt_span_lint::<rustc_span[5de9bfc504d26a6f]::span_encoding::Span, clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, &str, <clippy_lints[2d5f372497376e35]::dbg_macro::DbgMacro as rustc_lint[96dc6baabd10bd4e]::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}>
+ 17: 0x55b42470cb56 - <clippy_lints[2d5f372497376e35]::dbg_macro::DbgMacro as rustc_lint[96dc6baabd10bd4e]::passes::LateLintPass>::check_expr
+ 18: 0x7ff58b5fe513 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
+ 19: 0x7ff58b6d38fb - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
+ 20: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
+ 21: 0x7ff58b6d310b - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
+ 22: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
+ 23: 0x7ff58b601ab9 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_local
+ 24: 0x7ff58b5ff277 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_stmt
+ 25: 0x7ff58b60254c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_block
+ 26: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
+ 27: 0x7ff58b6d38fb - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
+ 28: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
+ 29: 0x7ff58b5ff265 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_stmt
+ 30: 0x7ff58b60254c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_block
+ 31: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
+ 32: 0x7ff58b5ff265 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_stmt
+ 33: 0x7ff58b60254c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_block
+ 34: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
+ 35: 0x7ff58b5fc724 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_body
+ 36: 0x7ff58b5ffae9 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_fn
+ 37: 0x7ff58b6d6323 - rustc_hir[a97542dc954c1f22]::intravisit::walk_item::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
+ 38: 0x7ff58b5f3de4 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_item
+ 39: 0x7ff58b60163c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_mod
+ 40: 0x7ff58b5f3de4 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_item
+ 41: 0x7ff58b60163c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_mod
+ 42: 0x7ff58b605531 - rustc_lint[96dc6baabd10bd4e]::late::late_lint_crate
+ 43: 0x7ff58b58dbce - rustc_data_structures[6b0c338be68cbdf0]::sync::parallel::serial_join::<rustc_lint[96dc6baabd10bd4e]::late::check_crate::{closure#0}, rustc_lint[96dc6baabd10bd4e]::late::check_crate::{closure#1}, (), ()>
+ 44: 0x7ff58b605b7b - rustc_lint[96dc6baabd10bd4e]::late::check_crate
+ 45: 0x7ff588ed3fe3 - <rustc_data_structures[6b0c338be68cbdf0]::sync::parallel::ParallelGuard>::run::<(), rustc_interface[7e2780b9127a51f3]::passes::analysis::{closure#0}::{closure#1}::{closure#0}>
+ 46: 0x7ff589091c51 - <rustc_session[1697b6e1c1bf6b08]::session::Session>::time::<(), rustc_interface[7e2780b9127a51f3]::passes::analysis::{closure#0}>
+ 47: 0x7ff589020bf2 - rustc_interface[7e2780b9127a51f3]::passes::analysis
+ 48: 0x7ff58b9821f3 - rustc_query_impl[296c58625f4e3441]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[296c58625f4e3441]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4a64cfee706b595]::query::erase::Erased<[u8; 0usize]>>
+ 49: 0x7ff58b8aa0d1 - <rustc_query_impl[296c58625f4e3441]::query_impl::analysis::dynamic_query::{closure#2} as core[b85b81897dd7c607]::ops::function::FnOnce<(rustc_middle[4a64cfee706b595]::ty::context::TyCtxt, ())>>::call_once
+ 50: 0x7ff58b770269 - rustc_query_system[e31d6d9fbccfd6f2]::query::plumbing::try_execute_query::<rustc_query_impl[296c58625f4e3441]::DynamicConfig<rustc_query_system[e31d6d9fbccfd6f2]::query::caches::SingleCache<rustc_middle[4a64cfee706b595]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[296c58625f4e3441]::plumbing::QueryCtxt, false>
+ 51: 0x7ff58ba785d2 - rustc_query_impl[296c58625f4e3441]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
+ 52: 0x7ff588c2e833 - <std[722de03b977f82e2]::thread::local::LocalKey<core[b85b81897dd7c607]::cell::Cell<*const ()>>>::with::<rustc_middle[4a64cfee706b595]::ty::context::tls::enter_context<<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>::enter<rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>::{closure#1}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>::{closure#0}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>
+ 53: 0x7ff588c4b072 - <rustc_middle[4a64cfee706b595]::ty::context::TyCtxt>::create_global_ctxt::<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
+ 54: 0x7ff588c2ae46 - <rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[b85b81897dd7c607]::ops::function::FnOnce<(&rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
+ 55: 0x7ff588c9a2b6 - <alloc[8f667485acfd4fc8]::boxed::Box<dyn for<'a> core[b85b81897dd7c607]::ops::function::FnOnce<(&'a rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &'a std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena<'a>>, &'a rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena<'a>>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}), Output = core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>> as core[b85b81897dd7c607]::ops::function::FnOnce<(&rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2})>>::call_once
+ 56: 0x7ff588c087e7 - rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt::<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>
+ 57: 0x7ff588ba2a69 - rustc_span[5de9bfc504d26a6f]::create_session_globals_then::<(), rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
+ 58: 0x7ff588bc3dd9 - std[722de03b977f82e2]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
+ 59: 0x7ff588bc6e44 - <<std[722de03b977f82e2]::thread::Builder>::spawn_unchecked_<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[b85b81897dd7c607]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
+ 60: 0x7ff58d6e4aa5 - <std[722de03b977f82e2]::sys::pal::unix::thread::Thread>:🆕:thread_start
+ 61: 0x7ff58686bac3 - <unknown>
+ 62: 0x7ff5868fd850 - <unknown>
+ 63: 0x0 - <unknown>
-error: aborting due to 19 previous errors
+error: the compiler unexpectedly panicked. this is a bug.
+note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml
+
+note: please make sure that you have updated to the latest nightly
+
+note: rustc 1.88.0-nightly (7ab5976f9 2025-05-07) running on x86_64-unknown-linux-gnu
+
---
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
|
---
error: the `dbg!` macro is intended as a debugging tool
##[error] --> tests/ui/dbg_macro/dbg_macro.rs:60:13
|
LL | let _ = dbg!();
| ^^^^^^
|
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!();
|
---
thread 'rustc' panicked at src/tools/clippy/clippy_lints/src/dbg_macro.rs:118:30:
internal error: entered unreachable code
stack backtrace:
0: 0x7ff58d6dbe60 - <<std[722de03b977f82e2]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[b85b81897dd7c607]::fmt::Display>::fmt
1: 0x7ff58d7383bf - core[b85b81897dd7c607]::fmt::write
2: 0x7ff58d6ced49 - <std[722de03b977f82e2]::sys::stdio::unix::Stderr as std[722de03b977f82e2]::io::Write>::write_fmt
3: 0x7ff58d6dbd02 - <std[722de03b977f82e2]::sys::backtrace::BacktraceLock>::print
4: 0x7ff58d6e0508 - std[722de03b977f82e2]::panicking::default_hook::{closure#0}
5: 0x7ff58d6e02a2 - std[722de03b977f82e2]::panicking::default_hook
6: 0x7ff588c9af22 - <alloc[8f667485acfd4fc8]::boxed::Box<rustc_driver_impl[5c0983139a933bca]::install_ice_hook::{closure#1}> as core[b85b81897dd7c607]::ops::function::Fn<(&dyn for<'a, 'b> core[b85b81897dd7c607]::ops::function::Fn<(&'a std[722de03b977f82e2]::panic::PanicHookInfo<'b>,), Output = ()> + core[b85b81897dd7c607]:📑:Sync + core[b85b81897dd7c607]:📑:Send, &std[722de03b977f82e2]::panic::PanicHookInfo)>>::call
7: 0x7ff58d6e117b - std[722de03b977f82e2]::panicking::rust_panic_with_hook
8: 0x7ff58d6e0d4a - std[722de03b977f82e2]::panicking::begin_panic_handler::{closure#0}
9: 0x7ff58d6dc479 - std[722de03b977f82e2]::sys::backtrace::__rust_end_short_backtrace::<std[722de03b977f82e2]::panicking::begin_panic_handler::{closure#0}, !>
10: 0x7ff58d6e098d - __rustc[210dc653f36a8667]::rust_begin_unwind
11: 0x7ff58d734000 - core[b85b81897dd7c607]::panicking::panic_fmt
12: 0x7ff58d73408c - core[b85b81897dd7c607]::panicking::panic
13: 0x55b4249a17c7 - <clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, &str, <clippy_lints[2d5f372497376e35]::dbg_macro::DbgMacro as rustc_lint[96dc6baabd10bd4e]::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0} as core[b85b81897dd7c607]::ops::function::FnOnce<(&mut rustc_errors[8c94111977c95880]::diagnostic::Diag<()>,)>>::call_once::{shim:vtable#0}
14: 0x7ff58cf158b3 - rustc_middle[4a64cfee706b595]::lint::lint_level::lint_level_impl
15: 0x55b424956d86 - rustc_middle[4a64cfee706b595]::lint::lint_level::<clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, &str, <clippy_lints[2d5f372497376e35]::dbg_macro::DbgMacro as rustc_lint[96dc6baabd10bd4e]::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}>
16: 0x55b42496afbc - <rustc_lint[96dc6baabd10bd4e]::context::LateContext as rustc_lint[96dc6baabd10bd4e]::context::LintContext>::opt_span_lint::<rustc_span[5de9bfc504d26a6f]::span_encoding::Span, clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, &str, <clippy_lints[2d5f372497376e35]::dbg_macro::DbgMacro as rustc_lint[96dc6baabd10bd4e]::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}>
17: 0x55b42470cb56 - <clippy_lints[2d5f372497376e35]::dbg_macro::DbgMacro as rustc_lint[96dc6baabd10bd4e]::passes::LateLintPass>::check_expr
18: 0x7ff58b5fe513 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
19: 0x7ff58b6d38fb - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
20: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
21: 0x7ff58b6d310b - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
22: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
23: 0x7ff58b601ab9 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_local
24: 0x7ff58b5ff277 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_stmt
25: 0x7ff58b60254c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_block
26: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
27: 0x7ff58b6d38fb - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
28: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
29: 0x7ff58b5ff265 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_stmt
30: 0x7ff58b60254c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_block
31: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
32: 0x7ff58b5ff265 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_stmt
33: 0x7ff58b60254c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_block
34: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
35: 0x7ff58b5fc724 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_body
36: 0x7ff58b5ffae9 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_fn
37: 0x7ff58b6d6323 - rustc_hir[a97542dc954c1f22]::intravisit::walk_item::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
38: 0x7ff58b5f3de4 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_item
39: 0x7ff58b60163c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_mod
40: 0x7ff58b5f3de4 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_item
41: 0x7ff58b60163c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_mod
42: 0x7ff58b605531 - rustc_lint[96dc6baabd10bd4e]::late::late_lint_crate
43: 0x7ff58b58dbce - rustc_data_structures[6b0c338be68cbdf0]::sync::parallel::serial_join::<rustc_lint[96dc6baabd10bd4e]::late::check_crate::{closure#0}, rustc_lint[96dc6baabd10bd4e]::late::check_crate::{closure#1}, (), ()>
44: 0x7ff58b605b7b - rustc_lint[96dc6baabd10bd4e]::late::check_crate
45: 0x7ff588ed3fe3 - <rustc_data_structures[6b0c338be68cbdf0]::sync::parallel::ParallelGuard>::run::<(), rustc_interface[7e2780b9127a51f3]::passes::analysis::{closure#0}::{closure#1}::{closure#0}>
46: 0x7ff589091c51 - <rustc_session[1697b6e1c1bf6b08]::session::Session>::time::<(), rustc_interface[7e2780b9127a51f3]::passes::analysis::{closure#0}>
47: 0x7ff589020bf2 - rustc_interface[7e2780b9127a51f3]::passes::analysis
48: 0x7ff58b9821f3 - rustc_query_impl[296c58625f4e3441]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[296c58625f4e3441]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4a64cfee706b595]::query::erase::Erased<[u8; 0usize]>>
49: 0x7ff58b8aa0d1 - <rustc_query_impl[296c58625f4e3441]::query_impl::analysis::dynamic_query::{closure#2} as core[b85b81897dd7c607]::ops::function::FnOnce<(rustc_middle[4a64cfee706b595]::ty::context::TyCtxt, ())>>::call_once
50: 0x7ff58b770269 - rustc_query_system[e31d6d9fbccfd6f2]::query::plumbing::try_execute_query::<rustc_query_impl[296c58625f4e3441]::DynamicConfig<rustc_query_system[e31d6d9fbccfd6f2]::query::caches::SingleCache<rustc_middle[4a64cfee706b595]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[296c58625f4e3441]::plumbing::QueryCtxt, false>
51: 0x7ff58ba785d2 - rustc_query_impl[296c58625f4e3441]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
52: 0x7ff588c2e833 - <std[722de03b977f82e2]::thread::local::LocalKey<core[b85b81897dd7c607]::cell::Cell<*const ()>>>::with::<rustc_middle[4a64cfee706b595]::ty::context::tls::enter_context<<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>::enter<rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>::{closure#1}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>::{closure#0}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>
53: 0x7ff588c4b072 - <rustc_middle[4a64cfee706b595]::ty::context::TyCtxt>::create_global_ctxt::<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
54: 0x7ff588c2ae46 - <rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[b85b81897dd7c607]::ops::function::FnOnce<(&rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
55: 0x7ff588c9a2b6 - <alloc[8f667485acfd4fc8]::boxed::Box<dyn for<'a> core[b85b81897dd7c607]::ops::function::FnOnce<(&'a rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &'a std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena<'a>>, &'a rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena<'a>>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}), Output = core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>> as core[b85b81897dd7c607]::ops::function::FnOnce<(&rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2})>>::call_once
56: 0x7ff588c087e7 - rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt::<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>
57: 0x7ff588ba2a69 - rustc_span[5de9bfc504d26a6f]::create_session_globals_then::<(), rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
58: 0x7ff588bc3dd9 - std[722de03b977f82e2]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
59: 0x7ff588bc6e44 - <<std[722de03b977f82e2]::thread::Builder>::spawn_unchecked_<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[b85b81897dd7c607]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
60: 0x7ff58d6e4aa5 - <std[722de03b977f82e2]::sys::pal::unix::thread::Thread>:🆕:thread_start
61: 0x7ff58686bac3 - <unknown>
62: 0x7ff5868fd850 - <unknown>
63: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml
note: please make sure that you have updated to the latest nightly
note: rustc 1.88.0-nightly (7ab5976f9 2025-05-07) running on x86_64-unknown-linux-gnu
---
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
|
---
error: the `dbg!` macro is intended as a debugging tool
##[error] --> tests/ui/dbg_macro/dbg_macro.rs:60:13
|
LL | let _ = dbg!();
| ^^^^^^
|
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!();
|
---
thread 'rustc' panicked at src/tools/clippy/clippy_lints/src/dbg_macro.rs:118:30:
internal error: entered unreachable code
stack backtrace:
0: 0x7ff58d6dbe60 - <<std[722de03b977f82e2]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[b85b81897dd7c607]::fmt::Display>::fmt
1: 0x7ff58d7383bf - core[b85b81897dd7c607]::fmt::write
2: 0x7ff58d6ced49 - <std[722de03b977f82e2]::sys::stdio::unix::Stderr as std[722de03b977f82e2]::io::Write>::write_fmt
3: 0x7ff58d6dbd02 - <std[722de03b977f82e2]::sys::backtrace::BacktraceLock>::print
4: 0x7ff58d6e0508 - std[722de03b977f82e2]::panicking::default_hook::{closure#0}
5: 0x7ff58d6e02a2 - std[722de03b977f82e2]::panicking::default_hook
6: 0x7ff588c9af22 - <alloc[8f667485acfd4fc8]::boxed::Box<rustc_driver_impl[5c0983139a933bca]::install_ice_hook::{closure#1}> as core[b85b81897dd7c607]::ops::function::Fn<(&dyn for<'a, 'b> core[b85b81897dd7c607]::ops::function::Fn<(&'a std[722de03b977f82e2]::panic::PanicHookInfo<'b>,), Output = ()> + core[b85b81897dd7c607]:📑:Sync + core[b85b81897dd7c607]:📑:Send, &std[722de03b977f82e2]::panic::PanicHookInfo)>>::call
7: 0x7ff58d6e117b - std[722de03b977f82e2]::panicking::rust_panic_with_hook
8: 0x7ff58d6e0d4a - std[722de03b977f82e2]::panicking::begin_panic_handler::{closure#0}
9: 0x7ff58d6dc479 - std[722de03b977f82e2]::sys::backtrace::__rust_end_short_backtrace::<std[722de03b977f82e2]::panicking::begin_panic_handler::{closure#0}, !>
10: 0x7ff58d6e098d - __rustc[210dc653f36a8667]::rust_begin_unwind
11: 0x7ff58d734000 - core[b85b81897dd7c607]::panicking::panic_fmt
12: 0x7ff58d73408c - core[b85b81897dd7c607]::panicking::panic
13: 0x55b4249a17c7 - <clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, &str, <clippy_lints[2d5f372497376e35]::dbg_macro::DbgMacro as rustc_lint[96dc6baabd10bd4e]::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0} as core[b85b81897dd7c607]::ops::function::FnOnce<(&mut rustc_errors[8c94111977c95880]::diagnostic::Diag<()>,)>>::call_once::{shim:vtable#0}
14: 0x7ff58cf158b3 - rustc_middle[4a64cfee706b595]::lint::lint_level::lint_level_impl
15: 0x55b424956d86 - rustc_middle[4a64cfee706b595]::lint::lint_level::<clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, &str, <clippy_lints[2d5f372497376e35]::dbg_macro::DbgMacro as rustc_lint[96dc6baabd10bd4e]::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}>
16: 0x55b42496afbc - <rustc_lint[96dc6baabd10bd4e]::context::LateContext as rustc_lint[96dc6baabd10bd4e]::context::LintContext>::opt_span_lint::<rustc_span[5de9bfc504d26a6f]::span_encoding::Span, clippy_utils[c196d6a64b72d1c]::diagnostics::span_lint_and_then<rustc_lint[96dc6baabd10bd4e]::context::LateContext, rustc_span[5de9bfc504d26a6f]::span_encoding::Span, &str, <clippy_lints[2d5f372497376e35]::dbg_macro::DbgMacro as rustc_lint[96dc6baabd10bd4e]::passes::LateLintPass>::check_expr::{closure#0}>::{closure#0}>
17: 0x55b42470cb56 - <clippy_lints[2d5f372497376e35]::dbg_macro::DbgMacro as rustc_lint[96dc6baabd10bd4e]::passes::LateLintPass>::check_expr
18: 0x7ff58b5fe513 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
19: 0x7ff58b6d38fb - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
20: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
21: 0x7ff58b6d310b - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
22: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
23: 0x7ff58b601ab9 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_local
24: 0x7ff58b5ff277 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_stmt
25: 0x7ff58b60254c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_block
26: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
27: 0x7ff58b6d38fb - rustc_hir[a97542dc954c1f22]::intravisit::walk_expr::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
28: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
29: 0x7ff58b5ff265 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_stmt
30: 0x7ff58b60254c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_block
31: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
32: 0x7ff58b5ff265 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_stmt
33: 0x7ff58b60254c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_block
34: 0x7ff58b5fe527 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_expr::{closure#0}
35: 0x7ff58b5fc724 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_body
36: 0x7ff58b5ffae9 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_fn
37: 0x7ff58b6d6323 - rustc_hir[a97542dc954c1f22]::intravisit::walk_item::<rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass>>
38: 0x7ff58b5f3de4 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_item
39: 0x7ff58b60163c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_mod
40: 0x7ff58b5f3de4 - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_nested_item
41: 0x7ff58b60163c - <rustc_lint[96dc6baabd10bd4e]::late::LateContextAndPass<rustc_lint[96dc6baabd10bd4e]::late::RuntimeCombinedLateLintPass> as rustc_hir[a97542dc954c1f22]::intravisit::Visitor>::visit_mod
42: 0x7ff58b605531 - rustc_lint[96dc6baabd10bd4e]::late::late_lint_crate
43: 0x7ff58b58dbce - rustc_data_structures[6b0c338be68cbdf0]::sync::parallel::serial_join::<rustc_lint[96dc6baabd10bd4e]::late::check_crate::{closure#0}, rustc_lint[96dc6baabd10bd4e]::late::check_crate::{closure#1}, (), ()>
44: 0x7ff58b605b7b - rustc_lint[96dc6baabd10bd4e]::late::check_crate
45: 0x7ff588ed3fe3 - <rustc_data_structures[6b0c338be68cbdf0]::sync::parallel::ParallelGuard>::run::<(), rustc_interface[7e2780b9127a51f3]::passes::analysis::{closure#0}::{closure#1}::{closure#0}>
46: 0x7ff589091c51 - <rustc_session[1697b6e1c1bf6b08]::session::Session>::time::<(), rustc_interface[7e2780b9127a51f3]::passes::analysis::{closure#0}>
47: 0x7ff589020bf2 - rustc_interface[7e2780b9127a51f3]::passes::analysis
48: 0x7ff58b9821f3 - rustc_query_impl[296c58625f4e3441]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[296c58625f4e3441]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4a64cfee706b595]::query::erase::Erased<[u8; 0usize]>>
49: 0x7ff58b8aa0d1 - <rustc_query_impl[296c58625f4e3441]::query_impl::analysis::dynamic_query::{closure#2} as core[b85b81897dd7c607]::ops::function::FnOnce<(rustc_middle[4a64cfee706b595]::ty::context::TyCtxt, ())>>::call_once
50: 0x7ff58b770269 - rustc_query_system[e31d6d9fbccfd6f2]::query::plumbing::try_execute_query::<rustc_query_impl[296c58625f4e3441]::DynamicConfig<rustc_query_system[e31d6d9fbccfd6f2]::query::caches::SingleCache<rustc_middle[4a64cfee706b595]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[296c58625f4e3441]::plumbing::QueryCtxt, false>
51: 0x7ff58ba785d2 - rustc_query_impl[296c58625f4e3441]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
52: 0x7ff588c2e833 - <std[722de03b977f82e2]::thread::local::LocalKey<core[b85b81897dd7c607]::cell::Cell<*const ()>>>::with::<rustc_middle[4a64cfee706b595]::ty::context::tls::enter_context<<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>::enter<rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>::{closure#1}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>::{closure#0}, core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>
53: 0x7ff588c4b072 - <rustc_middle[4a64cfee706b595]::ty::context::TyCtxt>::create_global_ctxt::<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
54: 0x7ff588c2ae46 - <rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[b85b81897dd7c607]::ops::function::FnOnce<(&rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
55: 0x7ff588c9a2b6 - <alloc[8f667485acfd4fc8]::boxed::Box<dyn for<'a> core[b85b81897dd7c607]::ops::function::FnOnce<(&'a rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &'a std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena<'a>>, &'a rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena<'a>>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}), Output = core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>>> as core[b85b81897dd7c607]::ops::function::FnOnce<(&rustc_session[1697b6e1c1bf6b08]::session::Session, rustc_middle[4a64cfee706b595]::ty::context::CurrentGcx, alloc[8f667485acfd4fc8]::sync::Arc<rustc_data_structures[6b0c338be68cbdf0]::jobserver::Proxy>, &std[722de03b977f82e2]::sync::once_lock::OnceLock<rustc_middle[4a64cfee706b595]::ty::context::GlobalCtxt>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_middle[4a64cfee706b595]::arena::Arena>, &rustc_data_structures[6b0c338be68cbdf0]::sync::worker_local::WorkerLocal<rustc_hir[a97542dc954c1f22]::Arena>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2})>>::call_once
56: 0x7ff588c087e7 - rustc_interface[7e2780b9127a51f3]::passes::create_and_enter_global_ctxt::<core[b85b81897dd7c607]::option::Option<rustc_interface[7e2780b9127a51f3]::queries::Linker>, rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}::{closure#2}>
57: 0x7ff588ba2a69 - rustc_span[5de9bfc504d26a6f]::create_session_globals_then::<(), rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
58: 0x7ff588bc3dd9 - std[722de03b977f82e2]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
59: 0x7ff588bc6e44 - <<std[722de03b977f82e2]::thread::Builder>::spawn_unchecked_<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_with_globals<rustc_interface[7e2780b9127a51f3]::util::run_in_thread_pool_with_globals<rustc_interface[7e2780b9127a51f3]::interface::run_compiler<(), rustc_driver_impl[5c0983139a933bca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[b85b81897dd7c607]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
60: 0x7ff58d6e4aa5 - <std[722de03b977f82e2]::sys::pal::unix::thread::Thread>:🆕:thread_start
61: 0x7ff58686bac3 - <unknown>
62: 0x7ff5868fd850 - <unknown>
63: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml
note: please make sure that you have updated to the latest nightly
note: rustc 1.88.0-nightly (7ab5976f9 2025-05-07) running on x86_64-unknown-linux-gnu