]> git.lizzy.rs Git - rust.git/blob - tests/ui/zero_ptr.stderr
Addition `manual_map` test for `unsafe` blocks
[rust.git] / tests / ui / zero_ptr.stderr
1 error: `0 as *const _` detected
2   --> $DIR/zero_ptr.rs:5:13
3    |
4 LL |     let _ = 0 as *const usize;
5    |             ^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::<usize>()`
6    |
7    = note: `-D clippy::zero-ptr` implied by `-D warnings`
8
9 error: `0 as *mut _` detected
10   --> $DIR/zero_ptr.rs:6:13
11    |
12 LL |     let _ = 0 as *mut f64;
13    |             ^^^^^^^^^^^^^ help: try: `std::ptr::null_mut::<f64>()`
14
15 error: `0 as *const _` detected
16   --> $DIR/zero_ptr.rs:7:24
17    |
18 LL |     let _: *const u8 = 0 as *const _;
19    |                        ^^^^^^^^^^^^^ help: try: `std::ptr::null()`
20
21 error: `0 as *const _` detected
22   --> $DIR/zero_ptr.rs:10:9
23    |
24 LL |     foo(0 as *const _, 0 as *mut _);
25    |         ^^^^^^^^^^^^^ help: try: `std::ptr::null()`
26
27 error: `0 as *mut _` detected
28   --> $DIR/zero_ptr.rs:10:24
29    |
30 LL |     foo(0 as *const _, 0 as *mut _);
31    |                        ^^^^^^^^^^^ help: try: `std::ptr::null_mut()`
32
33 error: aborting due to 5 previous errors
34