1 error[E0308]: mismatched types
2 --> $DIR/suggest-null-ptr.rs:18:13
5 | --- ^ expected `*const u8`, found `usize`
7 | arguments to this function are incorrect
9 = note: expected raw pointer `*const u8`
11 note: function defined here
12 --> $DIR/suggest-null-ptr.rs:7:8
14 LL | fn foo(ptr: *const u8);
16 help: if you meant to create a null pointer, use `std::ptr::null()`
18 LL | foo(std::ptr::null());
21 error[E0308]: mismatched types
22 --> $DIR/suggest-null-ptr.rs:21:17
25 | ------- ^ expected `*mut u8`, found `usize`
27 | arguments to this function are incorrect
29 = note: expected raw pointer `*mut u8`
31 note: function defined here
32 --> $DIR/suggest-null-ptr.rs:9:8
34 LL | fn foo_mut(ptr: *mut u8);
36 help: if you meant to create a null pointer, use `std::ptr::null_mut()`
38 LL | foo_mut(std::ptr::null_mut());
39 | ~~~~~~~~~~~~~~~~~~~~
41 error[E0308]: mismatched types
42 --> $DIR/suggest-null-ptr.rs:24:15
45 | ----- ^ expected `*const usize`, found `usize`
47 | arguments to this function are incorrect
49 = note: expected raw pointer `*const usize`
51 note: function defined here
52 --> $DIR/suggest-null-ptr.rs:11:8
54 LL | fn usize(ptr: *const usize);
56 help: if you meant to create a null pointer, use `std::ptr::null()`
58 LL | usize(std::ptr::null());
61 error[E0308]: mismatched types
62 --> $DIR/suggest-null-ptr.rs:27:19
65 | --------- ^ expected `*mut usize`, found `usize`
67 | arguments to this function are incorrect
69 = note: expected raw pointer `*mut usize`
71 note: function defined here
72 --> $DIR/suggest-null-ptr.rs:13:8
74 LL | fn usize_mut(ptr: *mut usize);
76 help: if you meant to create a null pointer, use `std::ptr::null_mut()`
78 LL | usize_mut(std::ptr::null_mut());
79 | ~~~~~~~~~~~~~~~~~~~~
81 error: aborting due to 4 previous errors
83 For more information about this error, try `rustc --explain E0308`.