Open
Description
snippet:
#![repr]
Version information
rustc 1.90.0-nightly (febb10d0a 2025-07-06)
binary: rustc
commit-hash: febb10d0a2d29278135676783f6a22eb83295981
commit-date: 2025-07-06
host: x86_64-unknown-linux-gnu
release: 1.90.0-nightly
LLVM version: 20.1.7
Possibly related line of code:
rust/compiler/rustc_passes/src/check_attr.rs
Lines 2850 to 2862 in febb10d
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
error[E0539]: malformed `repr` attribute input
--> /tmp/icemaker_global_tempdir.PCYCcoUVwBvo/rustc_testrunner_tmpdir_reporting.P7ZL440p6VNA/mvce.rs:1:1
|
1 | #![repr]
| ^^^^^^^^
| |
| expected this to be a list
| help: must be of the form: `#[repr(C | Rust | align(...) | packed(...) | <integer type> | transparent)]`
error[E0601]: `main` function not found in crate `mvce`
--> /tmp/icemaker_global_tempdir.PCYCcoUVwBvo/rustc_testrunner_tmpdir_reporting.P7ZL440p6VNA/mvce.rs:1:9
|
1 | #![repr]
| ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.PCYCcoUVwBvo/rustc_testrunner_tmpdir_reporting.P7ZL440p6VNA/mvce.rs`
thread 'rustc' panicked at compiler/rustc_passes/src/check_attr.rs:2856:24:
called `Option::unwrap()` on a `None` value
stack backtrace:
0: 0x78b8399250f3 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h6f789cdbb375b9d1
1: 0x78b83a002bbf - core::fmt::write::hc0db25627a8b3ef1
2: 0x78b83991ad33 - std::io::Write::write_fmt::hf35ae5616746e40d
3: 0x78b839924f52 - std::sys::backtrace::BacktraceLock::print::h8b0ff4e21f0d49a6
4: 0x78b8399289ea - std::panicking::default_hook::{{closure}}::h0a5832b13f8eb5d7
5: 0x78b83992856f - std::panicking::default_hook::hfa17505efd880b75
6: 0x78b8389f3723 - std[ad67314137b202ac]::panicking::update_hook::<alloc[d9ad0c98818e0cc]::boxed::Box<rustc_driver_impl[18de9f0f138ef463]::install_ice_hook::{closure#1}>>::{closure#0}
7: 0x78b83992923b - std::panicking::rust_panic_with_hook::hd1508b83b029cc83
8: 0x78b839928f06 - std::panicking::begin_panic_handler::{{closure}}::h348ada53ffe3d5e6
9: 0x78b8399255c9 - std::sys::backtrace::__rust_end_short_backtrace::hdf410e76e27c527e
10: 0x78b839928c1d - __rustc[6f7828ed109e8a03]::rust_begin_unwind
11: 0x78b8360a8160 - core::panicking::panic_fmt::h281ef5f4fdbb340d
12: 0x78b8363e28fc - core::panicking::panic::h12c1f0f169752318
13: 0x78b8360a9c99 - core::option::unwrap_failed::h3047f88a127e483a
14: 0x78b83ab2dae6 - rustc_passes[5d63fee6c93c9850]::check_attr::check_mod_attrs
15: 0x78b83ab2d065 - rustc_query_impl[76179ab5da90ec79]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[76179ab5da90ec79]::query_impl::check_mod_attrs::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4285aabb30c8ef99]::query::erase::Erased<[u8; 0usize]>>
16: 0x78b83aea639a - rustc_query_system[2d3c82dbed50a212]::query::plumbing::try_execute_query::<rustc_query_impl[76179ab5da90ec79]::DynamicConfig<rustc_query_system[2d3c82dbed50a212]::query::caches::DefaultCache<rustc_span[3ba616453bda59eb]::def_id::LocalModDefId, rustc_middle[4285aabb30c8ef99]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[76179ab5da90ec79]::plumbing::QueryCtxt, false>
17: 0x78b83aea614d - rustc_query_impl[76179ab5da90ec79]::query_impl::check_mod_attrs::get_query_non_incr::__rust_end_short_backtrace
18: 0x78b83aea5f1b - <rustc_middle[4285aabb30c8ef99]::ty::context::TyCtxt>::par_hir_for_each_module::<rustc_interface[67c76e4507be85b8]::passes::run_required_analyses::{closure#0}::{closure#0}::{closure#1}::{closure#0}>::{closure#0}
19: 0x78b83aa57f50 - rustc_interface[67c76e4507be85b8]::passes::analysis
20: 0x78b83aa57c6b - rustc_query_impl[76179ab5da90ec79]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[76179ab5da90ec79]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4285aabb30c8ef99]::query::erase::Erased<[u8; 0usize]>>
21: 0x78b83b086bfc - rustc_query_system[2d3c82dbed50a212]::query::plumbing::try_execute_query::<rustc_query_impl[76179ab5da90ec79]::DynamicConfig<rustc_query_system[2d3c82dbed50a212]::query::caches::SingleCache<rustc_middle[4285aabb30c8ef99]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[76179ab5da90ec79]::plumbing::QueryCtxt, false>
22: 0x78b83b0867c6 - rustc_query_impl[76179ab5da90ec79]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
23: 0x78b83b2fa856 - rustc_interface[67c76e4507be85b8]::passes::create_and_enter_global_ctxt::<core[e2adb9d2f9cd94fe]::option::Option<rustc_interface[67c76e4507be85b8]::queries::Linker>, rustc_driver_impl[18de9f0f138ef463]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
24: 0x78b83b2a0e43 - rustc_interface[67c76e4507be85b8]::interface::run_compiler::<(), rustc_driver_impl[18de9f0f138ef463]::run_compiler::{closure#0}>::{closure#1}
25: 0x78b83b1ca538 - std[ad67314137b202ac]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[67c76e4507be85b8]::util::run_in_thread_with_globals<rustc_interface[67c76e4507be85b8]::util::run_in_thread_pool_with_globals<rustc_interface[67c76e4507be85b8]::interface::run_compiler<(), rustc_driver_impl[18de9f0f138ef463]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
26: 0x78b83b1ca216 - <<std[ad67314137b202ac]::thread::Builder>::spawn_unchecked_<rustc_interface[67c76e4507be85b8]::util::run_in_thread_with_globals<rustc_interface[67c76e4507be85b8]::util::run_in_thread_pool_with_globals<rustc_interface[67c76e4507be85b8]::interface::run_compiler<(), rustc_driver_impl[18de9f0f138ef463]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[e2adb9d2f9cd94fe]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
27: 0x78b83b1c87fd - std::sys::pal::unix::thread::Thread::new::thread_start::hba0280e0a37337c8
28: 0x78b834ca57eb - <unknown>
29: 0x78b834d2918c - <unknown>
30: 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 (febb10d0a 2025-07-06) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [check_mod_attrs] checking attributes in top-level module
#1 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0539, E0601.
For more information about an error, try `rustc --explain E0539`.