Closed
Description
STR
use std::fmt;
// CoerceUnsized is not implemented for tuples. You can still create
// an unsized tuple by transmuting a trait object.
fn any<T>() -> T { unreachable!() }
fn main() {
let t: &(u8, fmt::Debug) = any();
println!("{:?}", &t.1);
}
Actual Results
Before #32939, this caused an LLVM error
Stored value type does not match pointer operand type!
store i8 %17, void (i8*)*** %18
void (i8*)**LLVM ERROR: Broken function found, compilation aborted!
Afterwards, this causes an ICE (the rustc size is the correct one):
error: internal compiler error: ../src/librustc_trans/type_of.rs:142: size differs (rustc: 1, llvm: 24) for type `(u8, std::fmt::Debug + 'static)` / Univariant {
variant: Struct {
align: Align {
raw: 48
},
packed: false,
sized: false,
offset_after_field: [
Size {
raw: 1
},
Size {
raw: 1
}
]
},
non_zero: false
}