Closed
Description
Such code:
#[allow(dead_code)]
fn _assert_pointers_are_64bits() -> ! {
unsafe {
::std::mem::transmute::<*const f64, [u8; 8]>(panic!())
}
}
fn main() {
}
compiled just fine with stable(1.11.0 (9b21dcd 2016-08-15)),
but failed with beta(rustc 1.12.0-beta.1 (822166b 2016-08-16)) and
nightly(rustc 1.13.0-nightly (499484f 2016-08-18)) with such error:
error[E0308]: mismatched types
--> bug.rs:4:9
|
4 | ::std::mem::transmute::<*const f64, [u8; 8]>(panic!())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected !, found array of 8 elements
|
= note: expected type `!`
= note: found type `[u8; 8]`
error: aborting due to previous error