blob: a71194ba8064326e7658f236aa2fb311ab4937d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// https://github.com/rust-lang/rust/issues/58212
//@ check-pass
trait FromUnchecked {
fn from_unchecked();
}
impl FromUnchecked for [u8; 1] {
fn from_unchecked() {
let mut array: Self = [0; 1];
let _ptr = &mut array as *mut [u8] as *mut u8;
}
}
fn main() {
}
|