fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
276 B10 linesraw
1// Regression test for issue #89497.
2
3// run-rustfix
4
5fn main() {
6    let pointer: usize = &1_i32 as *const i32 as usize;
7    let _reference: &'static i32 = unsafe { &*(pointer as *const i32) };
8    //~^ ERROR: non-primitive cast
9    //~| HELP: consider borrowing the value
10}