Closed
Description
snippet:
struct PrintOnDrop<'a>(&'a str);
impl Drop for PrintOnDrop<'_> ;
Version information
rustc 1.81.0-nightly (cb8a7ea0e 2024-06-20)
binary: rustc
commit-hash: cb8a7ea0ed866295e0f65725cea6662bea51971a
commit-date: 2024-06-20
host: x86_64-unknown-linux-gnu
release: 1.81.0-nightly
LLVM version: 18.1.7
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
error: unknown start of token: \u{37e}
--> /tmp/icemaker_global_tempdir.EweA4GFu25Ai/rustc_testrunner_tmpdir_reporting.8R2EphZwRLCc/mvce.rs:3:31
|
3 | impl Drop for PrintOnDrop<'_> ;
| ^
|
help: Unicode character ';' (Greek Question Mark) looks like ';' (Semicolon), but it is not
|
3 | impl Drop for PrintOnDrop<'_> ;
| ~
error: expected `{}`, found `;`
--> /tmp/icemaker_global_tempdir.EweA4GFu25Ai/rustc_testrunner_tmpdir_reporting.8R2EphZwRLCc/mvce.rs:3:31
|
3 | impl Drop for PrintOnDrop<'_> ;
| ^
|
= help: try using `{}` instead
error[E0601]: `main` function not found in crate `mvce`
--> /tmp/icemaker_global_tempdir.EweA4GFu25Ai/rustc_testrunner_tmpdir_reporting.8R2EphZwRLCc/mvce.rs:3:32
|
3 | impl Drop for PrintOnDrop<'_> ;
| ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.EweA4GFu25Ai/rustc_testrunner_tmpdir_reporting.8R2EphZwRLCc/mvce.rs`
thread 'rustc' panicked at compiler/rustc_span/src/source_map.rs:586:30:
byte index 65 is not a char boundary; it is inside ';' (bytes 64..66) of `struct PrintOnDrop<'a>(&'a str);
impl Drop for PrintOnDrop<'_> ;
`
stack backtrace:
0: 0x7213106b1915 - std::backtrace_rs::backtrace::libunwind::trace::ha291fbfd64f8645d
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
1: 0x7213106b1915 - std::backtrace_rs::backtrace::trace_unsynchronized::h0f1ec8eeb4d23463
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7213106b1915 - std::sys::backtrace::_print_fmt::hde95b17c0b35e271
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/std/src/sys/backtrace.rs:68:5
3: 0x7213106b1915 - <std::sys::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb324dbdfaad85d87
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/std/src/sys/backtrace.rs:44:22
4: 0x7213107024bb - core::fmt::rt::Argument::fmt::h4bbc2216d032b29a
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/core/src/fmt/rt.rs:165:63
5: 0x7213107024bb - core::fmt::write::h9ee4e80d5be5e082
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/core/src/fmt/mod.rs:1168:21
6: 0x7213106a65af - std::io::Write::write_fmt::h515a3c4c2cfe4ae1
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/std/src/io/mod.rs:1835:15
7: 0x7213106b16ee - std::sys::backtrace::_print::h8ca8e0bc45dc3b5d
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/std/src/sys/backtrace.rs:47:5
8: 0x7213106b16ee - std::sys::backtrace::print::h35d37f27db6bbf35
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/std/src/sys/backtrace.rs:34:9
9: 0x7213106b4129 - std::panicking::default_hook::{{closure}}::hf66091d321fde00e
10: 0x7213106b3ecc - std::panicking::default_hook::hb8deb023bb3a58aa
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/std/src/panicking.rs:292:9
11: 0x72130cd4f9e0 - std[3cb7c2e078c540c1]::panicking::update_hook::<alloc[da0decefddd6e90e]::boxed::Box<rustc_driver_impl[bfb76e7f0954192d]::install_ice_hook::{closure#0}>>::{closure#0}
12: 0x7213106b4a4f - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h82ea3441e652cbf7
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/alloc/src/boxed.rs:2076:9
13: 0x7213106b4a4f - std::panicking::rust_panic_with_hook::hf1ea2d67600dec3e
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/std/src/panicking.rs:804:13
14: 0x7213106b4677 - std::panicking::begin_panic_handler::{{closure}}::h63afd2987ed6b2d8
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/std/src/panicking.rs:670:13
15: 0x7213106b1dd9 - std::sys::backtrace::__rust_end_short_backtrace::h8eec498186c1f09a
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/std/src/sys/backtrace.rs:171:18
16: 0x7213106b4304 - rust_begin_unwind
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/std/src/panicking.rs:661:5
17: 0x7213106fea73 - core::panicking::panic_fmt::h03d6c687f9d9be4c
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/core/src/panicking.rs:74:14
18: 0x721310706c8c - core::str::slice_error_fail_rt::h8540f067ae1f6181
19: 0x72131070683a - core::str::slice_error_fail::hcffcb03b570a885e
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/core/src/str/mod.rs:89:5
20: 0x72130fc8b391 - <rustc_span[9764bbb60ccaec40]::source_map::SourceMap>::indentation_before::{closure#0}.cold
21: 0x72130f4368da - <rustc_span[9764bbb60ccaec40]::source_map::SourceMap>::indentation_before
22: 0x72130aa2e4fb - rustc_hir_analysis[b5836596c5ecd536]::check::check::check_item_type
23: 0x72130ba99f82 - rustc_hir_analysis[b5836596c5ecd536]::check::wfcheck::check_well_formed
24: 0x72130e5cd569 - rustc_query_impl[fd48be434985ce3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[fd48be434985ce3]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6dec774e880a165c]::query::erase::Erased<[u8; 1usize]>>
25: 0x72130e5cd7ea - rustc_query_system[87c75860726f94c9]::query::plumbing::try_execute_query::<rustc_query_impl[fd48be434985ce3]::DynamicConfig<rustc_query_system[87c75860726f94c9]::query::caches::VecCache<rustc_hir[27eb3db17c85a5b3]::hir_id::OwnerId, rustc_middle[6dec774e880a165c]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[fd48be434985ce3]::plumbing::QueryCtxt, false>
26: 0x72130e5cd546 - rustc_query_impl[fd48be434985ce3]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
27: 0x72130e5ce2c1 - rustc_hir_analysis[b5836596c5ecd536]::check::wfcheck::check_mod_type_wf
28: 0x72130e5ce107 - rustc_query_impl[fd48be434985ce3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[fd48be434985ce3]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6dec774e880a165c]::query::erase::Erased<[u8; 1usize]>>
29: 0x72130ecca0f0 - rustc_query_system[87c75860726f94c9]::query::plumbing::try_execute_query::<rustc_query_impl[fd48be434985ce3]::DynamicConfig<rustc_query_system[87c75860726f94c9]::query::caches::DefaultCache<rustc_span[9764bbb60ccaec40]::def_id::LocalModDefId, rustc_middle[6dec774e880a165c]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[fd48be434985ce3]::plumbing::QueryCtxt, false>
30: 0x72130ecc9e99 - rustc_query_impl[fd48be434985ce3]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
31: 0x72130e5dffcc - rustc_hir_analysis[b5836596c5ecd536]::check_crate
32: 0x72130e9e7087 - rustc_interface[723ef2a6affa26eb]::passes::analysis
33: 0x72130e9e6bc7 - rustc_query_impl[fd48be434985ce3]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[fd48be434985ce3]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6dec774e880a165c]::query::erase::Erased<[u8; 1usize]>>
34: 0x72130f02c9e5 - rustc_query_system[87c75860726f94c9]::query::plumbing::try_execute_query::<rustc_query_impl[fd48be434985ce3]::DynamicConfig<rustc_query_system[87c75860726f94c9]::query::caches::SingleCache<rustc_middle[6dec774e880a165c]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[fd48be434985ce3]::plumbing::QueryCtxt, false>
35: 0x72130f02c74f - rustc_query_impl[fd48be434985ce3]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
36: 0x72130eee8752 - rustc_interface[723ef2a6affa26eb]::interface::run_compiler::<core[d4d2cad7f3b970e8]::result::Result<(), rustc_span[9764bbb60ccaec40]::ErrorGuaranteed>, rustc_driver_impl[bfb76e7f0954192d]::run_compiler::{closure#0}>::{closure#1}
37: 0x72130eea9949 - std[3cb7c2e078c540c1]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[723ef2a6affa26eb]::util::run_in_thread_with_globals<rustc_interface[723ef2a6affa26eb]::util::run_in_thread_pool_with_globals<rustc_interface[723ef2a6affa26eb]::interface::run_compiler<core[d4d2cad7f3b970e8]::result::Result<(), rustc_span[9764bbb60ccaec40]::ErrorGuaranteed>, rustc_driver_impl[bfb76e7f0954192d]::run_compiler::{closure#0}>::{closure#1}, core[d4d2cad7f3b970e8]::result::Result<(), rustc_span[9764bbb60ccaec40]::ErrorGuaranteed>>::{closure#0}, core[d4d2cad7f3b970e8]::result::Result<(), rustc_span[9764bbb60ccaec40]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d4d2cad7f3b970e8]::result::Result<(), rustc_span[9764bbb60ccaec40]::ErrorGuaranteed>>
38: 0x72130eea9700 - <<std[3cb7c2e078c540c1]::thread::Builder>::spawn_unchecked_<rustc_interface[723ef2a6affa26eb]::util::run_in_thread_with_globals<rustc_interface[723ef2a6affa26eb]::util::run_in_thread_pool_with_globals<rustc_interface[723ef2a6affa26eb]::interface::run_compiler<core[d4d2cad7f3b970e8]::result::Result<(), rustc_span[9764bbb60ccaec40]::ErrorGuaranteed>, rustc_driver_impl[bfb76e7f0954192d]::run_compiler::{closure#0}>::{closure#1}, core[d4d2cad7f3b970e8]::result::Result<(), rustc_span[9764bbb60ccaec40]::ErrorGuaranteed>>::{closure#0}, core[d4d2cad7f3b970e8]::result::Result<(), rustc_span[9764bbb60ccaec40]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d4d2cad7f3b970e8]::result::Result<(), rustc_span[9764bbb60ccaec40]::ErrorGuaranteed>>::{closure#2} as core[d4d2cad7f3b970e8]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
39: 0x7213106be8cb - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h539c158965a5e86f
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/alloc/src/boxed.rs:2062:9
40: 0x7213106be8cb - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hcc467bc1472c32d2
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/alloc/src/boxed.rs:2062:9
41: 0x7213106be8cb - std::sys::pal::unix::thread::Thread::new::thread_start::h22273806a17d4b73
at /rustc/cb8a7ea0ed866295e0f65725cea6662bea51971a/library/std/src/sys/pal/unix/thread.rs:108:17
42: 0x7213098a6ded - <unknown>
43: 0x72130992a0dc - <unknown>
44: 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.81.0-nightly (cb8a7ea0e 2024-06-20) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [check_well_formed] checking that `<impl at /tmp/icemaker_global_tempdir.EweA4GFu25Ai/rustc_testrunner_tmpdir_reporting.8R2EphZwRLCc/mvce.rs:3:1: 3:30>` is well-formed
#1 [check_mod_type_wf] checking that types are well-formed in top-level module
end of query stack
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0601`.