2019-12-21 20:43:13 -06:00
|
|
|
// check-pass
|
2019-07-26 16:54:25 -05:00
|
|
|
|
2019-02-26 09:48:12 -06:00
|
|
|
trait FromUnchecked {
|
2019-12-21 20:43:13 -06:00
|
|
|
fn from_unchecked();
|
2019-02-26 09:48:12 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
impl FromUnchecked for [u8; 1] {
|
2019-12-21 20:43:13 -06:00
|
|
|
fn from_unchecked() {
|
|
|
|
let mut array: Self = [0; 1];
|
2019-02-26 09:48:12 -06:00
|
|
|
let _ptr = &mut array as *mut [u8] as *mut u8;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|