blob: c37c5357c82c0bf8f2410da350a2c0c7ccfc1396 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#![warn(clippy::borrow_as_ptr)]
#![allow(clippy::useless_vec)]
fn a() -> i32 {
0
}
fn main() {
let val = 1;
let _p = &val as *const i32;
let _p = &0 as *const i32;
let _p = &a() as *const i32;
let vec = vec![1];
let _p = &vec.len() as *const usize;
let mut val_mut = 1;
let _p_mut = &mut val_mut as *mut i32;
}
|