rust/tests/ui/issues/issue-14845.rs
2023-01-11 09:32:08 +00:00

11 lines
198 B
Rust

struct X {
a: [u8; 1]
}
fn main() {
let x = X { a: [0] };
let _f = &x.a as *mut u8; //~ ERROR casting
let local: [u8; 1] = [0];
let _v = &local as *mut u8; //~ ERROR casting
}