mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
12 lines
198 B
Rust
12 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
|
|
}
|