blob: 6eb81291abc7fb3292336934776bc59d9ae24b8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// run-rustfix
struct Something {
pub field: u32,
}
fn main() {
let mut something = Something { field: 1337 };
let _ = something.field;
let _pointer_to_something = something as *const Something;
//~^ ERROR: non-primitive cast
let _mut_pointer_to_something = something as *mut Something;
//~^ ERROR: non-primitive cast
}
|