Closed
Description
I thought I had tested the debug assertions that I added in #99420, but it seems I hadn't tested them on enough code, because they do actually fail, for example:
thread 'rustc' panicked at 'assertion failed: `(left == right)`
left: `Instance { def: VTableShim(DefId(2:3509 ~ core[3dde]::ops::function::FnOnce::call_once)), substs: [[closure@std::thread::Builder::spawn_unchecked_<[closure@tests/pass/weak_memory/weak.rs:38:20: 38:27], ()>::{closure#1}], ()] }`,
right: `Instance { def: Item(WithOptConstParam { did: DefId(1:985 ~ std[636e]::thread::{impl#0}::spawn_unchecked_::{closure#1}), const_param_did: None }), substs: [ReErased, ReErased, [closure@tests/pass/weak_memory/weak.rs:38:20: 38:27], (), i32, extern "rust-call" fn(()), (std::thread::Thread, std::option::Option<std::sync::Arc<std::sync::Mutex<std::vec::Vec<u8>>>>, [closure@tests/pass/weak_memory/weak.rs:38:20: 38:27], std::sync::Arc<std::thread::Packet<()>>)] }`', /home/r/src/rust/rustc/compiler/rustc_const_eval/src/interpret/terminator.rs:600:21
That's this assertion:
failing on this code:
note: the place in the program where the ICE was triggered
--> /home/r/src/rust/rustc/library/alloc/src/boxed.rs:1935:9
|
LL | <F as FnOnce<Args>>::call_once(*self, args)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@eddyb looks like the check you proposed does not always hold?
Metadata
Metadata
Assignees
Labels
No labels