ICE: `can't get the span of an arbitrary parsed attribute: Parsed(Cold `
Opened this issue · 10 comments
matthiaskrgr commented
snippet:
fn main() {
#[cold]
5
}Version information
rustc 1.90.0-nightly (d51b6f971 2025-06-27)
binary: rustc
commit-hash: d51b6f97122671c5de27cfc08cded235357e0d97
commit-date: 2025-06-27
host: x86_64-unknown-linux-gnu
release: 1.90.0-nightly
LLVM version: 20.1.7
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
warning: attribute should be applied to a function definition
--> /tmp/icemaker_global_tempdir.E7eKMRzU4Hi9/rustc_testrunner_tmpdir_reporting.FLqPWoufnRyw/mvce.rs:2:5
|
2 | #[cold]
| ^^^^^^^
3 | 5
| - not a function definition
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: `#[warn(unused_attributes)]` on by default
thread 'rustc' panicked at /rustc-dev/d51b6f97122671c5de27cfc08cded235357e0d97/compiler/rustc_hir/src/hir.rs:1306:18:
can't get the span of an arbitrary parsed attribute: Parsed(Cold(/tmp/icemaker_global_tempdir.E7eKMRzU4Hi9/rustc_testrunner_tmpdir_reporting.FLqPWoufnRyw/mvce.rs:2:5: 2:12 (#0)))
stack backtrace:
0: 0x77caa6f06d93 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h172786a053088a80
1: 0x77caa7602c3f - core::fmt::write::h7e8ea7c2bf766230
2: 0x77caa6efc9c3 - std::io::Write::write_fmt::h8aef4545d51610bc
3: 0x77caa6f06bf2 - std::sys::backtrace::BacktraceLock::print::hcaf1ccd6afbf2e1d
4: 0x77caa6f0a6ea - std::panicking::default_hook::{{closure}}::h4ce4779ce8a3e31a
5: 0x77caa6f0a26f - std::panicking::default_hook::hafe5dcd1475f74c9
6: 0x77caa5fe51f3 - std[ac406385963d06ba]::panicking::update_hook::<alloc[762d5bb616333adc]::boxed::Box<rustc_driver_impl[2409353bb348a1fe]::install_ice_hook::{closure#1}>>::{closure#0}
7: 0x77caa6f0af3b - std::panicking::rust_panic_with_hook::h2b643051b0ee54bd
8: 0x77caa6f0ac3a - std::panicking::begin_panic_handler::{{closure}}::h2f43df37d8ec1fc9
9: 0x77caa6f07269 - std::sys::backtrace::__rust_end_short_backtrace::hdd0bf39addaa3bbd
10: 0x77caa6f0a91d - __rustc[ec5114c7948ebf25]::rust_begin_unwind
11: 0x77caa36999c0 - core::panicking::panic_fmt::h7cdf2f61e2255620
12: 0x77caa91f14cd - <rustc_hir_typeck[d1b4da71dd966fd5]::fn_ctxt::FnCtxt>::precedence::{closure#0}.llvm.1929938728858289850.cold
13: 0x77caa8543865 - <rustc_hir[3d24d229c323ac03]::hir::Expr>::precedence
14: 0x77caa62eb7a9 - <rustc_hir_typeck[d1b4da71dd966fd5]::fn_ctxt::FnCtxt>::suggest_deref_ref_or_into
15: 0x77caa62a6b06 - <rustc_hir_typeck[d1b4da71dd966fd5]::fn_ctxt::FnCtxt>::emit_type_mismatch_suggestions
16: 0x77caa62ac0b0 - <rustc_hir_typeck[d1b4da71dd966fd5]::fn_ctxt::FnCtxt>::emit_coerce_suggestions
17: 0x77caa808487d - <rustc_hir_typeck[d1b4da71dd966fd5]::fn_ctxt::FnCtxt>::check_expr_block
18: 0x77caa80b2ee0 - <rustc_hir_typeck[d1b4da71dd966fd5]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
19: 0x77caa808c197 - rustc_hir_typeck[d1b4da71dd966fd5]::check::check_fn
20: 0x77caa87f6e8f - rustc_hir_typeck[d1b4da71dd966fd5]::typeck_with_inspect::{closure#0}
21: 0x77caa87e39b0 - rustc_query_impl[cdda87a48a29190a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cdda87a48a29190a]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85d0084cd8285b0d]::query::erase::Erased<[u8; 8usize]>>
22: 0x77caa786ee6e - rustc_query_system[c91322fa492962f5]::query::plumbing::try_execute_query::<rustc_query_impl[cdda87a48a29190a]::DynamicConfig<rustc_data_structures[deb77fa27d028d21]::vec_cache::VecCache<rustc_span[d438a3ce0d69ef07]::def_id::LocalDefId, rustc_middle[85d0084cd8285b0d]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[c91322fa492962f5]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[cdda87a48a29190a]::plumbing::QueryCtxt, false>
23: 0x77caa786e809 - rustc_query_impl[cdda87a48a29190a]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
24: 0x77caa78668ad - rustc_hir_analysis[a2924986fcd3aa06]::check_crate
25: 0x77caa786a927 - rustc_interface[e31b222a2d1d97f1]::passes::analysis
26: 0x77caa786a54b - rustc_query_impl[cdda87a48a29190a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[cdda87a48a29190a]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[85d0084cd8285b0d]::query::erase::Erased<[u8; 0usize]>>
27: 0x77caa868ba7c - rustc_query_system[c91322fa492962f5]::query::plumbing::try_execute_query::<rustc_query_impl[cdda87a48a29190a]::DynamicConfig<rustc_query_system[c91322fa492962f5]::query::caches::SingleCache<rustc_middle[85d0084cd8285b0d]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[cdda87a48a29190a]::plumbing::QueryCtxt, false>
28: 0x77caa868b752 - rustc_query_impl[cdda87a48a29190a]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
29: 0x77caa8855dd6 - rustc_interface[e31b222a2d1d97f1]::passes::create_and_enter_global_ctxt::<core[1aae05a66286d11a]::option::Option<rustc_interface[e31b222a2d1d97f1]::queries::Linker>, rustc_driver_impl[2409353bb348a1fe]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
30: 0x77caa88474af - rustc_interface[e31b222a2d1d97f1]::interface::run_compiler::<(), rustc_driver_impl[2409353bb348a1fe]::run_compiler::{closure#0}>::{closure#1}
31: 0x77caa88714f8 - std[ac406385963d06ba]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[e31b222a2d1d97f1]::util::run_in_thread_with_globals<rustc_interface[e31b222a2d1d97f1]::util::run_in_thread_pool_with_globals<rustc_interface[e31b222a2d1d97f1]::interface::run_compiler<(), rustc_driver_impl[2409353bb348a1fe]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
32: 0x77caa88711d6 - <<std[ac406385963d06ba]::thread::Builder>::spawn_unchecked_<rustc_interface[e31b222a2d1d97f1]::util::run_in_thread_with_globals<rustc_interface[e31b222a2d1d97f1]::util::run_in_thread_pool_with_globals<rustc_interface[e31b222a2d1d97f1]::interface::run_compiler<(), rustc_driver_impl[2409353bb348a1fe]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[1aae05a66286d11a]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
33: 0x77caa886f7fd - std::sys::pal::unix::thread::Thread::new::thread_start::hf9e92a00dfd64138
34: 0x77caa22a57eb - <unknown>
35: 0x77caa232918c - <unknown>
36: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: please make sure that you have updated to the latest nightly
note: rustc 1.90.0-nightly (d51b6f971 2025-06-27) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [typeck] type-checking `main`
#1 [analysis] running analysis passes on this crate
end of query stack
warning: 1 warning emitted
note: no errors encountered even though delayed bugs were created
note: those delayed bugs will now be shown as internal compiler errors
error: internal compiler error: coercion error but no error emitted
--> /tmp/icemaker_global_tempdir.E7eKMRzU4Hi9/rustc_testrunner_tmpdir_reporting.FLqPWoufnRyw/mvce.rs:3:5
|
3 | 5
| ^
|
note: delayed at compiler/rustc_hir_typeck/src/coercion.rs:1642:31
0: <rustc_errors::DiagCtxtInner>::emit_diagnostic
1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
3: <rustc_errors::DiagCtxtHandle>::span_delayed_bug::<rustc_span::span_encoding::Span, &str>
4: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
5: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
6: rustc_hir_typeck::check::check_fn
7: rustc_hir_typeck::typeck_with_inspect::{closure#0}
8: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
9: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
10: rustc_query_impl::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
11: rustc_hir_analysis::check_crate
12: rustc_interface::passes::analysis
13: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 0]>>
14: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
15: rustc_query_impl::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
16: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
17: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
18: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
19: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
20: std::sys::pal::unix::thread::Thread::new::thread_start
21: <unknown>
22: <unknown>
--> /tmp/icemaker_global_tempdir.E7eKMRzU4Hi9/rustc_testrunner_tmpdir_reporting.FLqPWoufnRyw/mvce.rs:3:5
|
3 | 5
| ^
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: please make sure that you have updated to the latest nightly
note: rustc 1.90.0-nightly (d51b6f971 2025-06-27) running on x86_64-unknown-linux-gnu
query stack during panic:
end of query stack
matthiaskrgr commented
bisects to #142491
matthiaskrgr commented
cc @JonathanBrouwer to make sure this ones doesn't get rereported 2 times as well 😅
JonathanBrouwer commented
@rustbot claim
Should be paying more attention to all the attributes issues clearly :)
Thanks for all the fuzzing work btw, it's great
matthiaskrgr commented
similarly
auto-reduced (treereduce-rust):
fn TokenStream() {
#[rustc_align(16)]
1u32
}original:
// https://github.com/rust-lang/rust/issues/54044
#![deny(BTreeSet)] //~ NOTE lint level is defined here
#[crate_type = foo!()]
//~^ ERROR attribute cannot be used on
//~| WARN previously accepted
struct Foobar;
fn TokenStream() {
#[rustc_align(16)]
//~^ ERROR constant's are not exportable
//~| WARN previously accepted
1u32
}Version information
rustc 1.92.0-nightly (dfa22235d 2025-09-21)
binary: rustc
commit-hash: dfa22235d858086511bedc4acde9db1c045ffbac
commit-date: 2025-09-21
host: x86_64-unknown-linux-gnu
release: 1.92.0-nightly
LLVM version: 21.1.1
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
error[E0658]: the `#[rustc_align]` attribute is an experimental feature
--> /tmp/icemaker_global_tempdir.566PyQHNciQd/rustc_testrunner_tmpdir_reporting.SlPYLKFTTLwB/mvce.rs:2:5
|
2 | #[rustc_align(16)]
| ^^^^^^^^^^^^^^^^^^
|
= note: see issue #82232 <https://github.com/rust-lang/rust/issues/82232> for more information
= help: add `#![feature(fn_align)]` to the crate attributes to enable
= note: this compiler was built on 2025-09-21; consider upgrading it if it is out of date
error: `#[rustc_align]` attribute cannot be used on expressions
--> /tmp/icemaker_global_tempdir.566PyQHNciQd/rustc_testrunner_tmpdir_reporting.SlPYLKFTTLwB/mvce.rs:2:5
|
2 | #[rustc_align(16)]
| ^^^^^^^^^^^^^^^^^^
|
= help: `#[rustc_align]` can only be applied to functions
error[E0601]: `main` function not found in crate `mvce`
--> /tmp/icemaker_global_tempdir.566PyQHNciQd/rustc_testrunner_tmpdir_reporting.SlPYLKFTTLwB/mvce.rs:4:2
|
4 | }
| ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.566PyQHNciQd/rustc_testrunner_tmpdir_reporting.SlPYLKFTTLwB/mvce.rs`
thread 'rustc' (1694681) panicked at /rustc-dev/dfa22235d858086511bedc4acde9db1c045ffbac/compiler/rustc_hir/src/hir.rs:1323:18:
can't get the span of an arbitrary parsed attribute: Parsed(Align { align: Align(16 bytes), span: /tmp/icemaker_global_tempdir.566PyQHNciQd/rustc_testrunner_tmpdir_reporting.SlPYLKFTTLwB/mvce.rs:2:5: 2:23 (#0) })
stack backtrace:
0: 0x7f7cbfffb183 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h16608a47a58d73d4
1: 0x7f7cc0602004 - core::fmt::write::hf92be9bf24684fc1
2: 0x7f7cbffafb31 - std::io::Write::write_fmt::hdad68e414b7f765a
3: 0x7f7cbffc0ef2 - std::sys::backtrace::BacktraceLock::print::haf4ea020276451c2
4: 0x7f7cbffc6e59 - std::panicking::default_hook::{{closure}}::h30fa5c30a93b8eb3
5: 0x7f7cbffc6983 - std::panicking::default_hook::h8163888efceed35b
6: 0x7f7cbefea2e7 - std[fa6bd2be5d6c32a4]::panicking::update_hook::<alloc[79b0486a9ccf039e]::boxed::Box<rustc_driver_impl[c8d10aaf1a4e1520]::install_ice_hook::{closure#1}>>::{closure#0}
7: 0x7f7cbffc727f - std::panicking::panic_with_hook::h2d46d7bbb8efb1c9
8: 0x7f7cbffc703a - std::panicking::panic_handler::{{closure}}::hda93abf7cec4055c
9: 0x7f7cbffc1029 - std::sys::backtrace::__rust_end_short_backtrace::hc868f5ee318e201c
10: 0x7f7cbffa1b6d - __rustc[f2614c7b079660a0]::rust_begin_unwind
11: 0x7f7cbd2f0750 - core::panicking::panic_fmt::h00f08f06f91126b4
12: 0x7f7cc20d233f - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::precedence::{closure#0}.llvm.5639224410123102657.cold
13: 0x7f7cc139cd65 - <rustc_hir[ab37ff83057cd263]::hir::Expr>::precedence
14: 0x7f7cbf2f91e5 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::suggest_deref_ref_or_into
15: 0x7f7cbf2c0274 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::emit_type_mismatch_suggestions
16: 0x7f7cbf2bbc93 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::emit_coerce_suggestions
17: 0x7f7cc13be25e - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::check_expr_block
18: 0x7f7cc13c2755 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
19: 0x7f7cc0c01562 - rustc_hir_typeck[91fb6c0cc6789b85]::check::check_fn
20: 0x7f7cc09d37a8 - rustc_hir_typeck[91fb6c0cc6789b85]::typeck_with_inspect::{closure#0}
21: 0x7f7cc09d1f76 - rustc_query_impl[ad96d725ed7264c6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ad96d725ed7264c6]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 8usize]>>
22: 0x7f7cc07cb544 - rustc_query_system[f70a1071bda0eed1]::query::plumbing::try_execute_query::<rustc_query_impl[ad96d725ed7264c6]::DynamicConfig<rustc_data_structures[94e3de7838444f11]::vec_cache::VecCache<rustc_span[4941ef9201c8ce7b]::def_id::LocalDefId, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[f70a1071bda0eed1]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[ad96d725ed7264c6]::plumbing::QueryCtxt, false>
23: 0x7f7cc07caec9 - rustc_query_impl[ad96d725ed7264c6]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
24: 0x7f7cc10a8d85 - <rustc_middle[a13da981eeb60da]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis[96ddc339829ee090]::check_crate::{closure#2}>::{closure#0}
25: 0x7f7cc10a810d - rustc_hir_analysis[96ddc339829ee090]::check_crate
26: 0x7f7cc07ccc30 - rustc_interface[c6188d231c4b1f7d]::passes::analysis
27: 0x7f7cc07cc8ed - rustc_query_impl[ad96d725ed7264c6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ad96d725ed7264c6]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 0usize]>>
28: 0x7f7cc16296a6 - rustc_query_system[f70a1071bda0eed1]::query::plumbing::try_execute_query::<rustc_query_impl[ad96d725ed7264c6]::DynamicConfig<rustc_query_system[f70a1071bda0eed1]::query::caches::SingleCache<rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[ad96d725ed7264c6]::plumbing::QueryCtxt, false>
29: 0x7f7cc16292fc - rustc_query_impl[ad96d725ed7264c6]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
30: 0x7f7cc185e80f - rustc_interface[c6188d231c4b1f7d]::passes::create_and_enter_global_ctxt::<core[403ed2bdab286bfa]::option::Option<rustc_interface[c6188d231c4b1f7d]::queries::Linker>, rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
31: 0x7f7cc17cebbe - rustc_interface[c6188d231c4b1f7d]::interface::run_compiler::<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}
32: 0x7f7cc17996f8 - std[fa6bd2be5d6c32a4]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_with_globals<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_pool_with_globals<rustc_interface[c6188d231c4b1f7d]::interface::run_compiler<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
33: 0x7f7cc17993dc - <<std[fa6bd2be5d6c32a4]::thread::Builder>::spawn_unchecked_<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_with_globals<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_pool_with_globals<rustc_interface[c6188d231c4b1f7d]::interface::run_compiler<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[403ed2bdab286bfa]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
34: 0x7f7cc179f30d - std::sys::thread::unix::Thread::new::thread_start::h93ecbf446405903f
35: 0x7f7cbb0969cb - <unknown>
36: 0x7f7cbb11aa0c - <unknown>
37: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: please make sure that you have updated to the latest nightly
note: rustc 1.92.0-nightly (dfa22235d 2025-09-21) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [typeck] type-checking `TokenStream`
#1 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0601, E0658.
For more information about an error, try `rustc --explain E0601`.
matthiaskrgr commented
fn main() {
#[macro_use]
1
}Program output
warning: `#[macro_use]` attribute cannot be used on expressions
--> 2E71EA72BD8B2FA17FD5D880E633492E4FB78939CAD51FF88D1325B16BD6A20B.rs:2:5
|
2 | #[macro_use]
| ^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= help: `#[macro_use]` can be applied to modules, extern crates, and crates
= note: `#[warn(unused_attributes)]` (part of `#[warn(unused)]`) on by default
thread 'rustc' (1695878) panicked at /rustc-dev/dd7fda570040e8a736f7d8bc28ddd1b444aabc82/compiler/rustc_hir/src/hir.rs:1323:18:
can't get the span of an arbitrary parsed attribute: Parsed(MacroUse { span: 2E71EA72BD8B2FA17FD5D880E633492E4FB78939CAD51FF88D1325B16BD6A20B.rs:2:5: 2:17 (#0), arguments: UseAll })
stack backtrace:
0: 0x7f8001002983 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h7c6ba7eb3d79c74e
1: 0x7f8001802044 - core::fmt::write::h51b415dc740abb61
2: 0x7f8000fb7201 - std::io::Write::write_fmt::h65024e6b411b5d6a
3: 0x7f8000fc86f2 - std::sys::backtrace::BacktraceLock::print::h1fa141d4115fcdc7
4: 0x7f8000fce659 - std::panicking::default_hook::{{closure}}::h5b8d1bafc007debc
5: 0x7f8000fce183 - std::panicking::default_hook::hbee1bd2db26bedfe
6: 0x7f7fffff23c7 - std[aa543e5c3b33e14e]::panicking::update_hook::<alloc[25bb32ac37752f7b]::boxed::Box<rustc_driver_impl[4e82038d4654c963]::install_ice_hook::{closure#1}>>::{closure#0}
7: 0x7f8000fcea7f - std::panicking::panic_with_hook::h8cbd8c4377e6572b
8: 0x7f8000fce83a - std::panicking::panic_handler::{{closure}}::h335ded1aca77b6b6
9: 0x7f8000fc8839 - std::sys::backtrace::__rust_end_short_backtrace::hd229ab5df32e8172
10: 0x7f8000fa936d - __rustc[8ed8e68a5aa5849d]::rust_begin_unwind
11: 0x7f7ffdff3dd0 - core::panicking::panic_fmt::hb55754338c38e2ee
12: 0x7f80032e46ff - <rustc_hir_typeck[135be1f05852888c]::fn_ctxt::FnCtxt>::precedence::{closure#0}.llvm.6317962172978937469.cold
13: 0x7f800259a6e5 - <rustc_hir[86cb696fb785e1dc]::hir::Expr>::precedence
14: 0x7f8000301875 - <rustc_hir_typeck[135be1f05852888c]::fn_ctxt::FnCtxt>::suggest_deref_ref_or_into
15: 0x7f80002c8554 - <rustc_hir_typeck[135be1f05852888c]::fn_ctxt::FnCtxt>::emit_type_mismatch_suggestions
16: 0x7f80002c3f73 - <rustc_hir_typeck[135be1f05852888c]::fn_ctxt::FnCtxt>::emit_coerce_suggestions
17: 0x7f80025c4cd9 - <rustc_hir_typeck[135be1f05852888c]::fn_ctxt::FnCtxt>::check_expr_block
18: 0x7f80025c91d5 - <rustc_hir_typeck[135be1f05852888c]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
19: 0x7f8001e125a1 - rustc_hir_typeck[135be1f05852888c]::check::check_fn
20: 0x7f8001be1528 - rustc_hir_typeck[135be1f05852888c]::typeck_with_inspect::{closure#0}
21: 0x7f8001bdfcf6 - rustc_query_impl[c74c6a12e169b097]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c74c6a12e169b097]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[224366ec5639bfdc]::query::erase::Erased<[u8; 8usize]>>
22: 0x7f8001a01344 - rustc_query_system[dabb8f7ac9ad8702]::query::plumbing::try_execute_query::<rustc_query_impl[c74c6a12e169b097]::DynamicConfig<rustc_data_structures[2c2d92c6a626fca3]::vec_cache::VecCache<rustc_span[201c3f2d192352b6]::def_id::LocalDefId, rustc_middle[224366ec5639bfdc]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[dabb8f7ac9ad8702]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[c74c6a12e169b097]::plumbing::QueryCtxt, false>
23: 0x7f8001a00cc9 - rustc_query_impl[c74c6a12e169b097]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
24: 0x7f8002243f85 - <rustc_middle[224366ec5639bfdc]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis[84156159369fd08e]::check_crate::{closure#2}>::{closure#0}
25: 0x7f800224330d - rustc_hir_analysis[84156159369fd08e]::check_crate
26: 0x7f8001a02a30 - rustc_interface[ddde8db7de1554b0]::passes::analysis
27: 0x7f8001a026ed - rustc_query_impl[c74c6a12e169b097]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c74c6a12e169b097]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[224366ec5639bfdc]::query::erase::Erased<[u8; 0usize]>>
28: 0x7f80027c2a60 - rustc_query_system[dabb8f7ac9ad8702]::query::plumbing::try_execute_query::<rustc_query_impl[c74c6a12e169b097]::DynamicConfig<rustc_query_system[dabb8f7ac9ad8702]::query::caches::SingleCache<rustc_middle[224366ec5639bfdc]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[c74c6a12e169b097]::plumbing::QueryCtxt, false>
29: 0x7f80027c26b6 - rustc_query_impl[c74c6a12e169b097]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
30: 0x7f8002b027cf - rustc_interface[ddde8db7de1554b0]::passes::create_and_enter_global_ctxt::<core[e1f2d92e823976a5]::option::Option<rustc_interface[ddde8db7de1554b0]::queries::Linker>, rustc_driver_impl[4e82038d4654c963]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
31: 0x7f8002a1643e - rustc_interface[ddde8db7de1554b0]::interface::run_compiler::<(), rustc_driver_impl[4e82038d4654c963]::run_compiler::{closure#0}>::{closure#1}
32: 0x7f8002997db8 - std[aa543e5c3b33e14e]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[ddde8db7de1554b0]::util::run_in_thread_with_globals<rustc_interface[ddde8db7de1554b0]::util::run_in_thread_pool_with_globals<rustc_interface[ddde8db7de1554b0]::interface::run_compiler<(), rustc_driver_impl[4e82038d4654c963]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
33: 0x7f8002997a88 - <<std[aa543e5c3b33e14e]::thread::Builder>::spawn_unchecked_<rustc_interface[ddde8db7de1554b0]::util::run_in_thread_with_globals<rustc_interface[ddde8db7de1554b0]::util::run_in_thread_pool_with_globals<rustc_interface[ddde8db7de1554b0]::interface::run_compiler<(), rustc_driver_impl[4e82038d4654c963]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[e1f2d92e823976a5]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
34: 0x7f800299ddcd - std::sys::thread::unix::Thread::new::thread_start::ha9de35456108e0f3
35: 0x7f7ffc0969cb - <unknown>
36: 0x7f7ffc11aa0c - <unknown>
37: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: please make sure that you have updated to the latest nightly
note: please attach the file at `/tmp/im/rustc-ice-2025-09-21T10_12_43-1695860.txt` to your bug report
query stack during panic:
#0 [typeck] type-checking `main`
#1 [analysis] running analysis passes on this crate
end of query stack
warning: 1 warning emitted
note: no errors encountered even though delayed bugs were created
note: those delayed bugs will now be shown as internal compiler errors
error: internal compiler error: coercion error but no error emitted
--> 2E71EA72BD8B2FA17FD5D880E633492E4FB78939CAD51FF88D1325B16BD6A20B.rs:3:5
|
3 | 1
| ^
|
note: delayed at compiler/rustc_hir_typeck/src/coercion.rs:1625:31 - disabled backtrace
--> 2E71EA72BD8B2FA17FD5D880E633492E4FB78939CAD51FF88D1325B16BD6A20B.rs:3:5
|
3 | 1
| ^
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: please make sure that you have updated to the latest nightly
note: please attach the file at `/tmp/im/rustc-ice-2025-09-21T10_12_43-1695860.txt` to your bug report
query stack during panic:
end of query stack
matthiaskrgr commented
fn main() {
#[loop_match]
5
}Program output
error[E0658]: the `#[loop_match]` attribute is an experimental feature
--> /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.kiUHmRs4o7RO/mvce.rs:3:5
|
3 | #[loop_match]
| ^^^^^^^^^^^^^
|
= note: see issue #132306 <https://github.com/rust-lang/rust/issues/132306> for more information
= help: add `#![feature(loop_match)]` to the crate attributes to enable
= note: this compiler was built on 2025-09-21; consider upgrading it if it is out of date
error: `#[loop_match]` should be applied to a loop
--> /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.kiUHmRs4o7RO/mvce.rs:3:5
|
3 | #[loop_match]
| ^^^^^^^^^^^^^
4 | 5
| - not a loop
thread 'rustc' (1703704) panicked at /rustc-dev/dfa22235d858086511bedc4acde9db1c045ffbac/compiler/rustc_hir/src/hir.rs:1323:18:
can't get the span of an arbitrary parsed attribute: Parsed(LoopMatch(/tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.kiUHmRs4o7RO/mvce.rs:3:5: 3:18 (#0)))
stack backtrace:
0: 0x7f8c491fb183 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h16608a47a58d73d4
1: 0x7f8c49802004 - core::fmt::write::hf92be9bf24684fc1
2: 0x7f8c491afb31 - std::io::Write::write_fmt::hdad68e414b7f765a
3: 0x7f8c491c0ef2 - std::sys::backtrace::BacktraceLock::print::haf4ea020276451c2
4: 0x7f8c491c6e59 - std::panicking::default_hook::{{closure}}::h30fa5c30a93b8eb3
5: 0x7f8c491c6983 - std::panicking::default_hook::h8163888efceed35b
6: 0x7f8c481ea2e7 - std[fa6bd2be5d6c32a4]::panicking::update_hook::<alloc[79b0486a9ccf039e]::boxed::Box<rustc_driver_impl[c8d10aaf1a4e1520]::install_ice_hook::{closure#1}>>::{closure#0}
7: 0x7f8c491c727f - std::panicking::panic_with_hook::h2d46d7bbb8efb1c9
8: 0x7f8c491c703a - std::panicking::panic_handler::{{closure}}::hda93abf7cec4055c
9: 0x7f8c491c1029 - std::sys::backtrace::__rust_end_short_backtrace::hc868f5ee318e201c
10: 0x7f8c491a1b6d - __rustc[f2614c7b079660a0]::rust_begin_unwind
11: 0x7f8c464f0750 - core::panicking::panic_fmt::h00f08f06f91126b4
12: 0x7f8c4b2d233f - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::precedence::{closure#0}.llvm.5639224410123102657.cold
13: 0x7f8c4a59cd65 - <rustc_hir[ab37ff83057cd263]::hir::Expr>::precedence
14: 0x7f8c484f91e5 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::suggest_deref_ref_or_into
15: 0x7f8c484c0274 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::emit_type_mismatch_suggestions
16: 0x7f8c484bbc93 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::emit_coerce_suggestions
17: 0x7f8c4a5be25e - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::check_expr_block
18: 0x7f8c4a5c2755 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
19: 0x7f8c49e01562 - rustc_hir_typeck[91fb6c0cc6789b85]::check::check_fn
20: 0x7f8c49bd37a8 - rustc_hir_typeck[91fb6c0cc6789b85]::typeck_with_inspect::{closure#0}
21: 0x7f8c49bd1f76 - rustc_query_impl[ad96d725ed7264c6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ad96d725ed7264c6]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 8usize]>>
22: 0x7f8c499cb544 - rustc_query_system[f70a1071bda0eed1]::query::plumbing::try_execute_query::<rustc_query_impl[ad96d725ed7264c6]::DynamicConfig<rustc_data_structures[94e3de7838444f11]::vec_cache::VecCache<rustc_span[4941ef9201c8ce7b]::def_id::LocalDefId, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[f70a1071bda0eed1]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[ad96d725ed7264c6]::plumbing::QueryCtxt, false>
23: 0x7f8c499caec9 - rustc_query_impl[ad96d725ed7264c6]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
24: 0x7f8c4a2a8d85 - <rustc_middle[a13da981eeb60da]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis[96ddc339829ee090]::check_crate::{closure#2}>::{closure#0}
25: 0x7f8c4a2a810d - rustc_hir_analysis[96ddc339829ee090]::check_crate
26: 0x7f8c499ccc30 - rustc_interface[c6188d231c4b1f7d]::passes::analysis
27: 0x7f8c499cc8ed - rustc_query_impl[ad96d725ed7264c6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ad96d725ed7264c6]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 0usize]>>
28: 0x7f8c4a8296a6 - rustc_query_system[f70a1071bda0eed1]::query::plumbing::try_execute_query::<rustc_query_impl[ad96d725ed7264c6]::DynamicConfig<rustc_query_system[f70a1071bda0eed1]::query::caches::SingleCache<rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[ad96d725ed7264c6]::plumbing::QueryCtxt, false>
29: 0x7f8c4a8292fc - rustc_query_impl[ad96d725ed7264c6]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
30: 0x7f8c4aa5e80f - rustc_interface[c6188d231c4b1f7d]::passes::create_and_enter_global_ctxt::<core[403ed2bdab286bfa]::option::Option<rustc_interface[c6188d231c4b1f7d]::queries::Linker>, rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
31: 0x7f8c4a9cebbe - rustc_interface[c6188d231c4b1f7d]::interface::run_compiler::<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}
32: 0x7f8c4a9996f8 - std[fa6bd2be5d6c32a4]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_with_globals<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_pool_with_globals<rustc_interface[c6188d231c4b1f7d]::interface::run_compiler<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
33: 0x7f8c4a9993dc - <<std[fa6bd2be5d6c32a4]::thread::Builder>::spawn_unchecked_<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_with_globals<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_pool_with_globals<rustc_interface[c6188d231c4b1f7d]::interface::run_compiler<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[403ed2bdab286bfa]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
34: 0x7f8c4a99f30d - std::sys::thread::unix::Thread::new::thread_start::h93ecbf446405903f
35: 0x7f8c442969cb - <unknown>
36: 0x7f8c4431aa0c - <unknown>
37: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: please make sure that you have updated to the latest nightly
note: rustc 1.92.0-nightly (dfa22235d 2025-09-21) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [typeck] type-checking `main`
#1 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0658`.
matthiaskrgr commented
pub fn f() {
#[crate_name = "xcrate_issue_61711_b"]
0
}Program output
error[E0601]: `main` function not found in crate `mvce`
--> /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.249NkS2WwY9t/mvce.rs:4:2
|
4 | }
| ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.249NkS2WwY9t/mvce.rs`
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]`
--> /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.249NkS2WwY9t/mvce.rs:2:5
|
2 | #[crate_name = "xcrate_issue_61711_b"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: This attribute does not have an `!`, which means it is applied to this expression
--> /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.249NkS2WwY9t/mvce.rs:3:5
|
3 | 0
| ^
= note: `#[warn(unused_attributes)]` (part of `#[warn(unused)]`) on by default
thread 'rustc' (1703745) panicked at /rustc-dev/dfa22235d858086511bedc4acde9db1c045ffbac/compiler/rustc_hir/src/hir.rs:1323:18:
can't get the span of an arbitrary parsed attribute: Parsed(CrateName { name: "xcrate_issue_61711_b", name_span: /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.249NkS2WwY9t/mvce.rs:2:20: 2:42 (#0), attr_span: /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.249NkS2WwY9t/mvce.rs:2:5: 2:43 (#0), style: Outer })
stack backtrace:
0: 0x7fe9f2ffb183 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h16608a47a58d73d4
1: 0x7fe9f3602004 - core::fmt::write::hf92be9bf24684fc1
2: 0x7fe9f2fafb31 - std::io::Write::write_fmt::hdad68e414b7f765a
3: 0x7fe9f2fc0ef2 - std::sys::backtrace::BacktraceLock::print::haf4ea020276451c2
4: 0x7fe9f2fc6e59 - std::panicking::default_hook::{{closure}}::h30fa5c30a93b8eb3
5: 0x7fe9f2fc6983 - std::panicking::default_hook::h8163888efceed35b
6: 0x7fe9f1fea2e7 - std[fa6bd2be5d6c32a4]::panicking::update_hook::<alloc[79b0486a9ccf039e]::boxed::Box<rustc_driver_impl[c8d10aaf1a4e1520]::install_ice_hook::{closure#1}>>::{closure#0}
7: 0x7fe9f2fc727f - std::panicking::panic_with_hook::h2d46d7bbb8efb1c9
8: 0x7fe9f2fc703a - std::panicking::panic_handler::{{closure}}::hda93abf7cec4055c
9: 0x7fe9f2fc1029 - std::sys::backtrace::__rust_end_short_backtrace::hc868f5ee318e201c
10: 0x7fe9f2fa1b6d - __rustc[f2614c7b079660a0]::rust_begin_unwind
11: 0x7fe9f02f0750 - core::panicking::panic_fmt::h00f08f06f91126b4
12: 0x7fe9f50d233f - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::precedence::{closure#0}.llvm.5639224410123102657.cold
13: 0x7fe9f439cd65 - <rustc_hir[ab37ff83057cd263]::hir::Expr>::precedence
14: 0x7fe9f22f91e5 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::suggest_deref_ref_or_into
15: 0x7fe9f22c0274 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::emit_type_mismatch_suggestions
16: 0x7fe9f22bbc93 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::emit_coerce_suggestions
17: 0x7fe9f43be25e - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::check_expr_block
18: 0x7fe9f43c2755 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
19: 0x7fe9f3c01562 - rustc_hir_typeck[91fb6c0cc6789b85]::check::check_fn
20: 0x7fe9f39d37a8 - rustc_hir_typeck[91fb6c0cc6789b85]::typeck_with_inspect::{closure#0}
21: 0x7fe9f39d1f76 - rustc_query_impl[ad96d725ed7264c6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ad96d725ed7264c6]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 8usize]>>
22: 0x7fe9f37cb544 - rustc_query_system[f70a1071bda0eed1]::query::plumbing::try_execute_query::<rustc_query_impl[ad96d725ed7264c6]::DynamicConfig<rustc_data_structures[94e3de7838444f11]::vec_cache::VecCache<rustc_span[4941ef9201c8ce7b]::def_id::LocalDefId, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[f70a1071bda0eed1]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[ad96d725ed7264c6]::plumbing::QueryCtxt, false>
23: 0x7fe9f37caec9 - rustc_query_impl[ad96d725ed7264c6]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
24: 0x7fe9f40a8d85 - <rustc_middle[a13da981eeb60da]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis[96ddc339829ee090]::check_crate::{closure#2}>::{closure#0}
25: 0x7fe9f40a810d - rustc_hir_analysis[96ddc339829ee090]::check_crate
26: 0x7fe9f37ccc30 - rustc_interface[c6188d231c4b1f7d]::passes::analysis
27: 0x7fe9f37cc8ed - rustc_query_impl[ad96d725ed7264c6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ad96d725ed7264c6]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 0usize]>>
28: 0x7fe9f46296a6 - rustc_query_system[f70a1071bda0eed1]::query::plumbing::try_execute_query::<rustc_query_impl[ad96d725ed7264c6]::DynamicConfig<rustc_query_system[f70a1071bda0eed1]::query::caches::SingleCache<rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[ad96d725ed7264c6]::plumbing::QueryCtxt, false>
29: 0x7fe9f46292fc - rustc_query_impl[ad96d725ed7264c6]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
30: 0x7fe9f485e80f - rustc_interface[c6188d231c4b1f7d]::passes::create_and_enter_global_ctxt::<core[403ed2bdab286bfa]::option::Option<rustc_interface[c6188d231c4b1f7d]::queries::Linker>, rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
31: 0x7fe9f47cebbe - rustc_interface[c6188d231c4b1f7d]::interface::run_compiler::<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}
32: 0x7fe9f47996f8 - std[fa6bd2be5d6c32a4]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_with_globals<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_pool_with_globals<rustc_interface[c6188d231c4b1f7d]::interface::run_compiler<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
33: 0x7fe9f47993dc - <<std[fa6bd2be5d6c32a4]::thread::Builder>::spawn_unchecked_<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_with_globals<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_pool_with_globals<rustc_interface[c6188d231c4b1f7d]::interface::run_compiler<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[403ed2bdab286bfa]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
34: 0x7fe9f479f30d - std::sys::thread::unix::Thread::new::thread_start::h93ecbf446405903f
35: 0x7fe9ee0969cb - <unknown>
36: 0x7fe9ee11aa0c - <unknown>
37: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: please make sure that you have updated to the latest nightly
note: rustc 1.92.0-nightly (dfa22235d 2025-09-21) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [typeck] type-checking `f`
#1 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0601`.
matthiaskrgr commented
pub fn main() {
fn k() {}
#[inline(always)]
|| -> fn() { k }
}Program output
thread 'rustc' (1703667) panicked at /rustc-dev/dfa22235d858086511bedc4acde9db1c045ffbac/compiler/rustc_hir/src/hir.rs:1323:18:
can't get the span of an arbitrary parsed attribute: Parsed(Inline(Always, /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.nKBUG3ibn5na/mvce.rs:3:5: 3:22 (#0)))
stack backtrace:
0: 0x7fcef43fb183 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h16608a47a58d73d4
1: 0x7fcef4a02004 - core::fmt::write::hf92be9bf24684fc1
2: 0x7fcef43afb31 - std::io::Write::write_fmt::hdad68e414b7f765a
3: 0x7fcef43c0ef2 - std::sys::backtrace::BacktraceLock::print::haf4ea020276451c2
4: 0x7fcef43c6e59 - std::panicking::default_hook::{{closure}}::h30fa5c30a93b8eb3
5: 0x7fcef43c6983 - std::panicking::default_hook::h8163888efceed35b
6: 0x7fcef33ea2e7 - std[fa6bd2be5d6c32a4]::panicking::update_hook::<alloc[79b0486a9ccf039e]::boxed::Box<rustc_driver_impl[c8d10aaf1a4e1520]::install_ice_hook::{closure#1}>>::{closure#0}
7: 0x7fcef43c727f - std::panicking::panic_with_hook::h2d46d7bbb8efb1c9
8: 0x7fcef43c703a - std::panicking::panic_handler::{{closure}}::hda93abf7cec4055c
9: 0x7fcef43c1029 - std::sys::backtrace::__rust_end_short_backtrace::hc868f5ee318e201c
10: 0x7fcef43a1b6d - __rustc[f2614c7b079660a0]::rust_begin_unwind
11: 0x7fcef16f0750 - core::panicking::panic_fmt::h00f08f06f91126b4
12: 0x7fcef64d233f - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::precedence::{closure#0}.llvm.5639224410123102657.cold
13: 0x7fcef579cd65 - <rustc_hir[ab37ff83057cd263]::hir::Expr>::precedence
14: 0x7fcef36f91e5 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::suggest_deref_ref_or_into
15: 0x7fcef36c0274 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::emit_type_mismatch_suggestions
16: 0x7fcef36bbc93 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::emit_coerce_suggestions
17: 0x7fcef57be25e - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::check_expr_block
18: 0x7fcef57c2755 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
19: 0x7fcef5001562 - rustc_hir_typeck[91fb6c0cc6789b85]::check::check_fn
20: 0x7fcef4dd37a8 - rustc_hir_typeck[91fb6c0cc6789b85]::typeck_with_inspect::{closure#0}
21: 0x7fcef4dd1f76 - rustc_query_impl[ad96d725ed7264c6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ad96d725ed7264c6]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 8usize]>>
22: 0x7fcef4bcb544 - rustc_query_system[f70a1071bda0eed1]::query::plumbing::try_execute_query::<rustc_query_impl[ad96d725ed7264c6]::DynamicConfig<rustc_data_structures[94e3de7838444f11]::vec_cache::VecCache<rustc_span[4941ef9201c8ce7b]::def_id::LocalDefId, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[f70a1071bda0eed1]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[ad96d725ed7264c6]::plumbing::QueryCtxt, false>
23: 0x7fcef4bcaec9 - rustc_query_impl[ad96d725ed7264c6]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
24: 0x7fcef54a8d85 - <rustc_middle[a13da981eeb60da]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis[96ddc339829ee090]::check_crate::{closure#2}>::{closure#0}
25: 0x7fcef54a810d - rustc_hir_analysis[96ddc339829ee090]::check_crate
26: 0x7fcef4bccc30 - rustc_interface[c6188d231c4b1f7d]::passes::analysis
27: 0x7fcef4bcc8ed - rustc_query_impl[ad96d725ed7264c6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ad96d725ed7264c6]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 0usize]>>
28: 0x7fcef5a296a6 - rustc_query_system[f70a1071bda0eed1]::query::plumbing::try_execute_query::<rustc_query_impl[ad96d725ed7264c6]::DynamicConfig<rustc_query_system[f70a1071bda0eed1]::query::caches::SingleCache<rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[ad96d725ed7264c6]::plumbing::QueryCtxt, false>
29: 0x7fcef5a292fc - rustc_query_impl[ad96d725ed7264c6]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
30: 0x7fcef5c5e80f - rustc_interface[c6188d231c4b1f7d]::passes::create_and_enter_global_ctxt::<core[403ed2bdab286bfa]::option::Option<rustc_interface[c6188d231c4b1f7d]::queries::Linker>, rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
31: 0x7fcef5bcebbe - rustc_interface[c6188d231c4b1f7d]::interface::run_compiler::<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}
32: 0x7fcef5b996f8 - std[fa6bd2be5d6c32a4]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_with_globals<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_pool_with_globals<rustc_interface[c6188d231c4b1f7d]::interface::run_compiler<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
33: 0x7fcef5b993dc - <<std[fa6bd2be5d6c32a4]::thread::Builder>::spawn_unchecked_<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_with_globals<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_pool_with_globals<rustc_interface[c6188d231c4b1f7d]::interface::run_compiler<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[403ed2bdab286bfa]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
34: 0x7fcef5b9f30d - std::sys::thread::unix::Thread::new::thread_start::h93ecbf446405903f
35: 0x7fceef4969cb - <unknown>
36: 0x7fceef51aa0c - <unknown>
37: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: please make sure that you have updated to the latest nightly
note: rustc 1.92.0-nightly (dfa22235d 2025-09-21) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [typeck] type-checking `main`
#1 [analysis] running analysis passes on this crate
end of query stack
note: no errors encountered even though delayed bugs were created
note: those delayed bugs will now be shown as internal compiler errors
error: internal compiler error: coercion error but no error emitted
--> /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.nKBUG3ibn5na/mvce.rs:4:5
|
4 | || -> fn() { k }
| ^^^^^^^^^^^^^^^^
|
note: delayed at compiler/rustc_hir_typeck/src/coercion.rs:1625:31
0: <rustc_errors::DiagCtxtInner>::emit_diagnostic
1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
3: <rustc_errors::DiagCtxtHandle>::span_delayed_bug::<rustc_span::span_encoding::Span, &str>
4: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
5: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
6: rustc_hir_typeck::check::check_fn
7: rustc_hir_typeck::typeck_with_inspect::{closure#0}
8: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
9: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
10: rustc_query_impl::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
11: <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis::check_crate::{closure#2}>::{closure#0}
12: rustc_hir_analysis::check_crate
13: rustc_interface::passes::analysis
14: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 0]>>
15: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
16: rustc_query_impl::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
17: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
18: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
19: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
20: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
21: std::sys::thread::unix::Thread::new::thread_start
22: <unknown>
23: <unknown>
--> /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.nKBUG3ibn5na/mvce.rs:4:5
|
4 | || -> fn() { k }
| ^^^^^^^^^^^^^^^^
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: please make sure that you have updated to the latest nightly
note: rustc 1.92.0-nightly (dfa22235d 2025-09-21) running on x86_64-unknown-linux-gnu
query stack during panic:
end of query stack
matthiaskrgr commented
fn public() {
#[inline]
0
}Program output
error: `#[inline]` attribute cannot be used on expressions
--> /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.2frUFmjCs1ZJ/mvce.rs:3:5
|
3 | #[inline]
| ^^^^^^^^^
|
= help: `#[inline]` can only be applied to functions
error[E0601]: `main` function not found in crate `mvce`
--> /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.2frUFmjCs1ZJ/mvce.rs:5:2
|
5 | }
| ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.2frUFmjCs1ZJ/mvce.rs`
thread 'rustc' (1703693) panicked at /rustc-dev/dfa22235d858086511bedc4acde9db1c045ffbac/compiler/rustc_hir/src/hir.rs:1323:18:
can't get the span of an arbitrary parsed attribute: Parsed(Inline(Hint, /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.2frUFmjCs1ZJ/mvce.rs:3:5: 3:14 (#0)))
stack backtrace:
0: 0x7f86ac7fb183 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h16608a47a58d73d4
1: 0x7f86ace02004 - core::fmt::write::hf92be9bf24684fc1
2: 0x7f86ac7afb31 - std::io::Write::write_fmt::hdad68e414b7f765a
3: 0x7f86ac7c0ef2 - std::sys::backtrace::BacktraceLock::print::haf4ea020276451c2
4: 0x7f86ac7c6e59 - std::panicking::default_hook::{{closure}}::h30fa5c30a93b8eb3
5: 0x7f86ac7c6983 - std::panicking::default_hook::h8163888efceed35b
6: 0x7f86ab7ea2e7 - std[fa6bd2be5d6c32a4]::panicking::update_hook::<alloc[79b0486a9ccf039e]::boxed::Box<rustc_driver_impl[c8d10aaf1a4e1520]::install_ice_hook::{closure#1}>>::{closure#0}
7: 0x7f86ac7c727f - std::panicking::panic_with_hook::h2d46d7bbb8efb1c9
8: 0x7f86ac7c703a - std::panicking::panic_handler::{{closure}}::hda93abf7cec4055c
9: 0x7f86ac7c1029 - std::sys::backtrace::__rust_end_short_backtrace::hc868f5ee318e201c
10: 0x7f86ac7a1b6d - __rustc[f2614c7b079660a0]::rust_begin_unwind
11: 0x7f86a9af0750 - core::panicking::panic_fmt::h00f08f06f91126b4
12: 0x7f86ae8d233f - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::precedence::{closure#0}.llvm.5639224410123102657.cold
13: 0x7f86adb9cd65 - <rustc_hir[ab37ff83057cd263]::hir::Expr>::precedence
14: 0x7f86abaf91e5 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::suggest_deref_ref_or_into
15: 0x7f86abac0274 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::emit_type_mismatch_suggestions
16: 0x7f86ababbc93 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::emit_coerce_suggestions
17: 0x7f86adbbe25e - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::check_expr_block
18: 0x7f86adbc2755 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
19: 0x7f86ad401562 - rustc_hir_typeck[91fb6c0cc6789b85]::check::check_fn
20: 0x7f86ad1d37a8 - rustc_hir_typeck[91fb6c0cc6789b85]::typeck_with_inspect::{closure#0}
21: 0x7f86ad1d1f76 - rustc_query_impl[ad96d725ed7264c6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ad96d725ed7264c6]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 8usize]>>
22: 0x7f86acfcb544 - rustc_query_system[f70a1071bda0eed1]::query::plumbing::try_execute_query::<rustc_query_impl[ad96d725ed7264c6]::DynamicConfig<rustc_data_structures[94e3de7838444f11]::vec_cache::VecCache<rustc_span[4941ef9201c8ce7b]::def_id::LocalDefId, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[f70a1071bda0eed1]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[ad96d725ed7264c6]::plumbing::QueryCtxt, false>
23: 0x7f86acfcaec9 - rustc_query_impl[ad96d725ed7264c6]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
24: 0x7f86ad8a8d85 - <rustc_middle[a13da981eeb60da]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis[96ddc339829ee090]::check_crate::{closure#2}>::{closure#0}
25: 0x7f86ad8a810d - rustc_hir_analysis[96ddc339829ee090]::check_crate
26: 0x7f86acfccc30 - rustc_interface[c6188d231c4b1f7d]::passes::analysis
27: 0x7f86acfcc8ed - rustc_query_impl[ad96d725ed7264c6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ad96d725ed7264c6]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 0usize]>>
28: 0x7f86ade296a6 - rustc_query_system[f70a1071bda0eed1]::query::plumbing::try_execute_query::<rustc_query_impl[ad96d725ed7264c6]::DynamicConfig<rustc_query_system[f70a1071bda0eed1]::query::caches::SingleCache<rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[ad96d725ed7264c6]::plumbing::QueryCtxt, false>
29: 0x7f86ade292fc - rustc_query_impl[ad96d725ed7264c6]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
30: 0x7f86ae05e80f - rustc_interface[c6188d231c4b1f7d]::passes::create_and_enter_global_ctxt::<core[403ed2bdab286bfa]::option::Option<rustc_interface[c6188d231c4b1f7d]::queries::Linker>, rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
31: 0x7f86adfcebbe - rustc_interface[c6188d231c4b1f7d]::interface::run_compiler::<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}
32: 0x7f86adf996f8 - std[fa6bd2be5d6c32a4]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_with_globals<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_pool_with_globals<rustc_interface[c6188d231c4b1f7d]::interface::run_compiler<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
33: 0x7f86adf993dc - <<std[fa6bd2be5d6c32a4]::thread::Builder>::spawn_unchecked_<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_with_globals<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_pool_with_globals<rustc_interface[c6188d231c4b1f7d]::interface::run_compiler<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[403ed2bdab286bfa]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
34: 0x7f86adf9f30d - std::sys::thread::unix::Thread::new::thread_start::h93ecbf446405903f
35: 0x7f86a78969cb - <unknown>
36: 0x7f86a791aa0c - <unknown>
37: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: please make sure that you have updated to the latest nightly
note: rustc 1.92.0-nightly (dfa22235d 2025-09-21) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [typeck] type-checking `public`
#1 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0601`.
matthiaskrgr commented
auto-reduced (treereduce-rust):
pub fn public() {
#[proc_macro_derive(Bleh)]
0
}Program output
error: `#[proc_macro_derive]` attribute cannot be used on expressions
--> /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.uJ361J3EBQcP/mvce.rs:2:5
|
2 | #[proc_macro_derive(Bleh)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[proc_macro_derive]` can only be applied to functions
error[E0601]: `main` function not found in crate `mvce`
--> /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.uJ361J3EBQcP/mvce.rs:4:2
|
4 | }
| ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.uJ361J3EBQcP/mvce.rs`
thread 'rustc' (1703673) panicked at /rustc-dev/dfa22235d858086511bedc4acde9db1c045ffbac/compiler/rustc_hir/src/hir.rs:1323:18:
can't get the span of an arbitrary parsed attribute: Parsed(ProcMacroDerive { trait_name: "Bleh", helper_attrs: [], span: /tmp/icemaker_global_tempdir.SRvLe1RNvHnF/rustc_testrunner_tmpdir_reporting.uJ361J3EBQcP/mvce.rs:2:5: 2:31 (#0) })
stack backtrace:
0: 0x7f741a7fb183 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h16608a47a58d73d4
1: 0x7f741ae02004 - core::fmt::write::hf92be9bf24684fc1
2: 0x7f741a7afb31 - std::io::Write::write_fmt::hdad68e414b7f765a
3: 0x7f741a7c0ef2 - std::sys::backtrace::BacktraceLock::print::haf4ea020276451c2
4: 0x7f741a7c6e59 - std::panicking::default_hook::{{closure}}::h30fa5c30a93b8eb3
5: 0x7f741a7c6983 - std::panicking::default_hook::h8163888efceed35b
6: 0x7f74197ea2e7 - std[fa6bd2be5d6c32a4]::panicking::update_hook::<alloc[79b0486a9ccf039e]::boxed::Box<rustc_driver_impl[c8d10aaf1a4e1520]::install_ice_hook::{closure#1}>>::{closure#0}
7: 0x7f741a7c727f - std::panicking::panic_with_hook::h2d46d7bbb8efb1c9
8: 0x7f741a7c703a - std::panicking::panic_handler::{{closure}}::hda93abf7cec4055c
9: 0x7f741a7c1029 - std::sys::backtrace::__rust_end_short_backtrace::hc868f5ee318e201c
10: 0x7f741a7a1b6d - __rustc[f2614c7b079660a0]::rust_begin_unwind
11: 0x7f7417af0750 - core::panicking::panic_fmt::h00f08f06f91126b4
12: 0x7f741c8d233f - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::precedence::{closure#0}.llvm.5639224410123102657.cold
13: 0x7f741bb9cd65 - <rustc_hir[ab37ff83057cd263]::hir::Expr>::precedence
14: 0x7f7419af91e5 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::suggest_deref_ref_or_into
15: 0x7f7419ac0274 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::emit_type_mismatch_suggestions
16: 0x7f7419abbc93 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::emit_coerce_suggestions
17: 0x7f741bbbe25e - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::check_expr_block
18: 0x7f741bbc2755 - <rustc_hir_typeck[91fb6c0cc6789b85]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
19: 0x7f741b401562 - rustc_hir_typeck[91fb6c0cc6789b85]::check::check_fn
20: 0x7f741b1d37a8 - rustc_hir_typeck[91fb6c0cc6789b85]::typeck_with_inspect::{closure#0}
21: 0x7f741b1d1f76 - rustc_query_impl[ad96d725ed7264c6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ad96d725ed7264c6]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 8usize]>>
22: 0x7f741afcb544 - rustc_query_system[f70a1071bda0eed1]::query::plumbing::try_execute_query::<rustc_query_impl[ad96d725ed7264c6]::DynamicConfig<rustc_data_structures[94e3de7838444f11]::vec_cache::VecCache<rustc_span[4941ef9201c8ce7b]::def_id::LocalDefId, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[f70a1071bda0eed1]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[ad96d725ed7264c6]::plumbing::QueryCtxt, false>
23: 0x7f741afcaec9 - rustc_query_impl[ad96d725ed7264c6]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
24: 0x7f741b8a8d85 - <rustc_middle[a13da981eeb60da]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis[96ddc339829ee090]::check_crate::{closure#2}>::{closure#0}
25: 0x7f741b8a810d - rustc_hir_analysis[96ddc339829ee090]::check_crate
26: 0x7f741afccc30 - rustc_interface[c6188d231c4b1f7d]::passes::analysis
27: 0x7f741afcc8ed - rustc_query_impl[ad96d725ed7264c6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[ad96d725ed7264c6]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 0usize]>>
28: 0x7f741be296a6 - rustc_query_system[f70a1071bda0eed1]::query::plumbing::try_execute_query::<rustc_query_impl[ad96d725ed7264c6]::DynamicConfig<rustc_query_system[f70a1071bda0eed1]::query::caches::SingleCache<rustc_middle[a13da981eeb60da]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[ad96d725ed7264c6]::plumbing::QueryCtxt, false>
29: 0x7f741be292fc - rustc_query_impl[ad96d725ed7264c6]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
30: 0x7f741c05e80f - rustc_interface[c6188d231c4b1f7d]::passes::create_and_enter_global_ctxt::<core[403ed2bdab286bfa]::option::Option<rustc_interface[c6188d231c4b1f7d]::queries::Linker>, rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
31: 0x7f741bfcebbe - rustc_interface[c6188d231c4b1f7d]::interface::run_compiler::<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}
32: 0x7f741bf996f8 - std[fa6bd2be5d6c32a4]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_with_globals<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_pool_with_globals<rustc_interface[c6188d231c4b1f7d]::interface::run_compiler<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
33: 0x7f741bf993dc - <<std[fa6bd2be5d6c32a4]::thread::Builder>::spawn_unchecked_<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_with_globals<rustc_interface[c6188d231c4b1f7d]::util::run_in_thread_pool_with_globals<rustc_interface[c6188d231c4b1f7d]::interface::run_compiler<(), rustc_driver_impl[c8d10aaf1a4e1520]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[403ed2bdab286bfa]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
34: 0x7f741bf9f30d - std::sys::thread::unix::Thread::new::thread_start::h93ecbf446405903f
35: 0x7f74158969cb - <unknown>
36: 0x7f741591aa0c - <unknown>
37: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: please make sure that you have updated to the latest nightly
note: rustc 1.92.0-nightly (dfa22235d 2025-09-21) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [typeck] type-checking `public`
#1 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0601`.