]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrow_as_ptr_no_std.stderr
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / borrow_as_ptr_no_std.stderr
1 error: borrow as raw pointer
2   --> $DIR/borrow_as_ptr_no_std.rs:9:14
3    |
4 LL |     let _p = &val as *const i32;
5    |              ^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::addr_of!(val)`
6    |
7    = note: `-D clippy::borrow-as-ptr` implied by `-D warnings`
8
9 error: borrow as raw pointer
10   --> $DIR/borrow_as_ptr_no_std.rs:12:18
11    |
12 LL |     let _p_mut = &mut val_mut as *mut i32;
13    |                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core::ptr::addr_of_mut!(val_mut)`
14
15 error: aborting due to 2 previous errors
16