fork/rust

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

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

master
1.0 KiB35 linesraw
1error: `0 as *const _` detected
2  --> $DIR/zero_ptr.rs:4:13
3   |
4LL |     let _ = 0 as *const usize;
5   |             ^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::<usize>()`
6   |
7   = note: `-D clippy::zero-ptr` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::zero_ptr)]`
9
10error: `0 as *mut _` detected
11  --> $DIR/zero_ptr.rs:5:13
12   |
13LL |     let _ = 0 as *mut f64;
14   |             ^^^^^^^^^^^^^ help: try: `std::ptr::null_mut::<f64>()`
15
16error: `0 as *const _` detected
17  --> $DIR/zero_ptr.rs:6:24
18   |
19LL |     let _: *const u8 = 0 as *const _;
20   |                        ^^^^^^^^^^^^^ help: try: `std::ptr::null()`
21
22error: `0 as *const _` detected
23  --> $DIR/zero_ptr.rs:9:9
24   |
25LL |     foo(0 as *const _, 0 as *mut _);
26   |         ^^^^^^^^^^^^^ help: try: `std::ptr::null()`
27
28error: `0 as *mut _` detected
29  --> $DIR/zero_ptr.rs:9:24
30   |
31LL |     foo(0 as *const _, 0 as *mut _);
32   |                        ^^^^^^^^^^^ help: try: `std::ptr::null_mut()`
33
34error: aborting due to 5 previous errors
35