rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.18k stars 12.7k forks source link

ICE: `Couldn't translate Aggregate { sized: true } as backend immediate` #109992

Closed matthiaskrgr closed 1 year ago

matthiaskrgr commented 1 year ago

Code

fn test_fn_transmute_zst(x: ()) -> [(); 1] {
    id(unsafe { std::mem::transmute(x) })
}

fn id<T>(x: T) -> T {
    x
}

fn main() {
    let r = 3;

    assert_eq!(test_fn_transmute_zst(()), [()]);
}

Meta

rustc --version --verbose:

b2b676d886ded452125712a304c524c08360f916

Error output

requires debug assertions! rustc treereduce.out -Zmir-opt-level=0

<output>
Backtrace

``` warning: unused variable: `r` --> treereduce.out:10:9 | 10 | let r = 3; | ^ help: if this is intentional, prefix it with an underscore: `_r` | = note: `#[warn(unused_variables)]` on by default error: internal compiler error: /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mir/rvalue.rs:892:22: Couldn't translate Aggregate { sized: true } as backend immediate thread 'rustc' panicked at 'Box', /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/lib.rs:1644:9 stack backtrace: 0: 0x7f50b0b08b74 - std::backtrace_rs::backtrace::libunwind::trace::hb665cc1e15997bac at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x7f50b0b08b74 - std::backtrace_rs::backtrace::trace_unsynchronized::h055f8ddc726b8f7c at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7f50b0b08b74 - std::sys_common::backtrace::_print_fmt::h999bfbccdb2f08c6 at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:65:5 3: 0x7f50b0b08b74 - ::fmt::h69192bf0ed9c5c99 at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:44:22 4: 0x7f50b0bb962b - core::fmt::write::h2dac34aae88eac3a at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/fmt/mod.rs:1254:17 5: 0x7f50b0b4cc4f - std::io::Write::write_fmt::ha9250e813467be99 at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/io/mod.rs:1698:15 6: 0x7f50b0b08975 - std::sys_common::backtrace::_print::h7f5c2f1ca54d0413 at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:47:5 7: 0x7f50b0b08975 - std::sys_common::backtrace::print::h6c093bf114bc8569 at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:34:9 8: 0x7f50b0b33ef4 - std::panicking::default_hook::{{closure}}::hbab87a1d77c907c2 9: 0x7f50b0b33b2d - std::panicking::default_hook::h888aa058ad9d0fac at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:288:9 10: 0x7f50b3666b75 - core[56d2be079082b2f7]::ops::function::Fn<(&'a core[56d2be079082b2f7]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[56d2be079082b2f7]::marker::Send + core[56d2be079082b2f7]::marker::Sync> as core[56d2be079082b2f7]::ops::function::Fn<(&core[56d2be079082b2f7]::panic::panic_info::PanicInfo,)>>::call at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1990:9 11: 0x7f50b3666b75 - rustc_driver_impl[53cfb4cfe592b1cc]::DEFAULT_HOOK::{closure#0}::{closure#0} at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_driver_impl/src/lib.rs:1199:17 12: 0x7f50b0b346e1 - as core::ops::function::Fn>::call::h40961c4fa974a79e at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1990:9 13: 0x7f50b0b346e1 - std::panicking::rust_panic_with_hook::hf2bdefcf339fd31a at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:694:13 14: 0x7f50b46a64b3 - std[86ab35e6a6527d40]::panicking::begin_panic::::{closure#0} at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:610:9 15: 0x7f50b46a0486 - std[86ab35e6a6527d40]::sys_common::backtrace::__rust_end_short_backtrace::::{closure#0}, !> at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:150:18 16: 0x7f50b47b9216 - std[86ab35e6a6527d40]::panicking::begin_panic:: at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:609:12 17: 0x7f50b4729ffa - std[86ab35e6a6527d40]::panic::panic_any:: at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panic.rs:61:5 18: 0x7f50b4729ffa - ::bug::<&alloc[8685091c532fe695]::string::String> at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/lib.rs:1644:9 19: 0x7f50b4729ba0 - ::bug::<&alloc[8685091c532fe695]::string::String> at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/lib.rs:1064:9 20: 0x7f50b47a9d9e - rustc_middle[1621e1d9efb092ce]::util::bug::opt_span_bug_fmt::::{closure#0} at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/util/bug.rs:35:34 21: 0x7f50b47a93d4 - rustc_middle[1621e1d9efb092ce]::ty::context::tls::with_opt::::{closure#0}, !>::{closure#0} at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:154:36 22: 0x7f50b47a936e - rustc_middle[1621e1d9efb092ce]::ty::context::tls::with_context_opt::::{closure#0}, !>::{closure#0}, !> at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:100:18 23: 0x7f50b47a9cd7 - rustc_middle[1621e1d9efb092ce]::ty::context::tls::with_opt::::{closure#0}, !> at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:154:5 24: 0x7f50b47a9cd7 - rustc_middle[1621e1d9efb092ce]::util::bug::opt_span_bug_fmt:: at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/util/bug.rs:31:5 25: 0x7f50b47a9c53 - rustc_middle[1621e1d9efb092ce]::util::bug::bug_fmt at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/util/bug.rs:15:5 26: 0x7f50b32e0241 - >::value_kind at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mir/rvalue.rs:892:22 27: 0x7f50b32e0396 - >::rvalue_creates_operand at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mir/rvalue.rs:843:24 28: 0x7f50b31f7b62 - as rustc_middle[1621e1d9efb092ce]::mir::visit::Visitor>::visit_assign at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mir/analyze.rs:183:21 29: 0x7f50b31f7b62 - as rustc_middle[1621e1d9efb092ce]::mir::visit::Visitor>::super_statement at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/mir/visit.rs:370:25 30: 0x7f50b31f7b62 - as rustc_middle[1621e1d9efb092ce]::mir::visit::Visitor>::visit_statement at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/mir/visit.rs:105:17 31: 0x7f50b31f7b62 - as rustc_middle[1621e1d9efb092ce]::mir::visit::Visitor>::super_basic_block_data at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/mir/visit.rs:299:21 32: 0x7f50b31f7b62 - as rustc_middle[1621e1d9efb092ce]::mir::visit::Visitor>::visit_basic_block_data at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/mir/visit.rs:90:17 33: 0x7f50b31f7b62 - rustc_codegen_ssa[cb990c0ddf67acf7]::mir::analyze::non_ssa_locals:: at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mir/analyze.rs:46:9 34: 0x7f50b32c72bc - rustc_codegen_ssa[cb990c0ddf67acf7]::mir::codegen_mir:: at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mir/mod.rs:224:25 35: 0x7f50b3248d64 - rustc_codegen_ssa[cb990c0ddf67acf7]::base::codegen_instance:: at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/base.rs:398:5 36: 0x7f50b328ba75 - ::define:: at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/mono_item.rs:91:17 37: 0x7f50b315415e - rustc_codegen_llvm[c562a0c5f00a438f]::base::compile_codegen_unit::module_codegen at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/base.rs:95:17 38: 0x7f50b3158a14 - >::with_task::> at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/dep_graph/graph.rs:275:22 39: 0x7f50b3158a14 - rustc_codegen_llvm[c562a0c5f00a438f]::base::compile_codegen_unit at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/base.rs:64:37 40: 0x7f50b3158a14 - ::compile_codegen_unit at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/lib.rs:131:9 41: 0x7f50b3248110 - rustc_codegen_ssa[cb990c0ddf67acf7]::base::codegen_crate:: at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_ssa/src/base.rs:733:34 42: 0x7f50b315e407 - ::codegen_crate at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_codegen_llvm/src/lib.rs:343:18 43: 0x7f50b41b6462 - rustc_interface[a109d3959576535b]::passes::start_codegen::{closure#0} at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/passes.rs:874:9 44: 0x7f50b41b6462 - ::run::, rustc_interface[a109d3959576535b]::passes::start_codegen::{closure#0}> at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/profiling.rs:752:9 45: 0x7f50b41b6462 - ::time::, rustc_interface[a109d3959576535b]::passes::start_codegen::{closure#0}> at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_session/src/utils.rs:11:50 46: 0x7f50b41b6462 - rustc_interface[a109d3959576535b]::passes::start_codegen at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/passes.rs:873:19 47: 0x7f50b4273a85 - ::ongoing_codegen::{closure#0}::{closure#0} at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:264:20 48: 0x7f50b4273a85 - ::enter::<::ongoing_codegen::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0} at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context.rs:559:37 49: 0x7f50b4273a85 - rustc_middle[1621e1d9efb092ce]::ty::context::tls::enter_context::<::enter<::ongoing_codegen::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}, core[56d2be079082b2f7]::result::Result, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0} at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:82:9 50: 0x7f50b4273a85 - >>::try_with::::enter<::ongoing_codegen::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}, core[56d2be079082b2f7]::result::Result, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}, core[56d2be079082b2f7]::result::Result, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>> at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:252:16 51: 0x7f50b4273a85 - >>::with::::enter<::ongoing_codegen::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}, core[56d2be079082b2f7]::result::Result, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}, core[56d2be079082b2f7]::result::Result, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>> at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:228:9 52: 0x7f50b42b33ab - rustc_middle[1621e1d9efb092ce]::ty::context::tls::enter_context::<::enter<::ongoing_codegen::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}, core[56d2be079082b2f7]::result::Result, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>> at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:79:5 53: 0x7f50b42b33ab - ::enter::<::ongoing_codegen::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>> at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context.rs:559:9 54: 0x7f50b42b33ab - >::enter::, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>, ::ongoing_codegen::{closure#0}::{closure#0}> at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:71:9 55: 0x7f50b42b33ab - ::ongoing_codegen::{closure#0} at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:251:13 56: 0x7f50b42b33ab - >>::compute::<::ongoing_codegen::{closure#0}>::{closure#0}::{closure#0} at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:45:41 57: 0x7f50b42b33ab - >, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>>::get_or_insert_with::<>>::compute<::ongoing_codegen::{closure#0}>::{closure#0}::{closure#0}> at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/option.rs:1724:49 58: 0x7f50b42b33ab - >>::compute::<::ongoing_codegen::{closure#0}>::{closure#0} at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:45:17 59: 0x7f50b42b33ab - >, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>>>::filter_map::>, >>::compute<::ongoing_codegen::{closure#0}>::{closure#0}> at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/cell.rs:1637:15 60: 0x7f50b42b33ab - >>::compute::<::ongoing_codegen::{closure#0}> at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:42:9 61: 0x7f50b42b33ab - ::ongoing_codegen at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:250:9 62: 0x7f50b36cd873 - rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}::{closure#2} at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_driver_impl/src/lib.rs:397:13 63: 0x7f50b36cd873 - ::enter::, rustc_span[5e1e12958345f30f]::ErrorGuaranteed>> at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/queries.rs:394:19 64: 0x7f50b3667eab - rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1} at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_driver_impl/src/lib.rs:332:22 65: 0x7f50b3667eab - rustc_interface[a109d3959576535b]::interface::run_compiler::, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}::{closure#0} at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/interface.rs:301:21 66: 0x7f50b3667eab - rustc_span[5e1e12958345f30f]::set_source_map::, rustc_interface[a109d3959576535b]::interface::run_compiler, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}::{closure#0}> at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_span/src/lib.rs:1040:5 67: 0x7f50b3677832 - rustc_interface[a109d3959576535b]::interface::run_compiler::, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0} at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/interface.rs:295:13 68: 0x7f50b3677832 - >::set::, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>> at /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.0/src/lib.rs:137:9 69: 0x7f50b3677832 - rustc_span[5e1e12958345f30f]::create_session_globals_then::, rustc_interface[a109d3959576535b]::interface::run_compiler, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}> at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_span/src/lib.rs:120:5 70: 0x7f50b3677832 - rustc_interface[a109d3959576535b]::util::run_in_thread_pool_with_globals::, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0} at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_interface/src/util.rs:152:38 71: 0x7f50b3677832 - std[86ab35e6a6527d40]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>> at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:134:18 72: 0x7f50b367b6b1 - ::spawn_unchecked_::, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#1}::{closure#0} at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/mod.rs:525:17 73: 0x7f50b367b6b1 - ::spawn_unchecked_, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#1}::{closure#0}> as core[56d2be079082b2f7]::ops::function::FnOnce<()>>::call_once at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/panic/unwind_safe.rs:271:9 74: 0x7f50b367b6b1 - std[86ab35e6a6527d40]::panicking::try::do_call::::spawn_unchecked_, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#1}::{closure#0}>, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>> at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:485:40 75: 0x7f50b367b6b1 - std[86ab35e6a6527d40]::panicking::try::, core[56d2be079082b2f7]::panic::unwind_safe::AssertUnwindSafe<::spawn_unchecked_, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#1}::{closure#0}>> at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:449:19 76: 0x7f50b367b6b1 - std[86ab35e6a6527d40]::panic::catch_unwind::::spawn_unchecked_, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#1}::{closure#0}>, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>> at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panic.rs:140:14 77: 0x7f50b367b6b1 - ::spawn_unchecked_::, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#1} at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/mod.rs:524:30 78: 0x7f50b367b6b1 - <::spawn_unchecked_, rustc_driver_impl[53cfb4cfe592b1cc]::run_compiler::{closure#1}>::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[56d2be079082b2f7]::result::Result<(), rustc_span[5e1e12958345f30f]::ErrorGuaranteed>>::{closure#1} as core[56d2be079082b2f7]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/ops/function.rs:250:5 79: 0x7f50b0b381da - as core::ops::function::FnOnce>::call_once::h354d14dc16c7e009 at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1976:9 80: 0x7f50b0b381da - as core::ops::function::FnOnce>::call_once::h6252c296bff6789e at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:1976:9 81: 0x7f50b0b0b035 - std::sys::unix::thread::Thread::new::thread_start::hc92da0325fb0a23e at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys/unix/thread.rs:108:17 82: 0x7f50b0c9ebb5 - 83: 0x7f50b0d20d90 - 84: 0x0 - 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: rustc 1.70.0-dev running on x86_64-unknown-linux-gnu note: compiler flags: -Z mir-opt-level=0 query stack during panic: end of query stack error: aborting due to previous error; 1 warning emitted ```

Noratrieb commented 1 year ago

transmute, so cc @scottmcm

scottmcm commented 1 year ago

Thanks for catching this! I'll make a fix.

scottmcm commented 1 year ago

@matthiaskrgr Which debug assertions do I need here? Is it this config?

[rust]
debug-assertions = true
matthiaskrgr commented 1 year ago
[llvm]
assertions = true

[rust]
debug = true
debug-assertions = true
debug-assertions-std = true
overflow-checks = true
overflow-checks-std = true