3 // Suggest providing a std::ptr::null{,_mut}() to a function that takes in a raw
4 // pointer if a literal 0 was provided by the user.
7 fn foo(ptr: *const u8);
9 fn foo_mut(ptr: *mut u8);
11 fn usize(ptr: *const usize);
13 fn usize_mut(ptr: *mut usize);
19 //~^ mismatched types [E0308]
20 //~| if you meant to create a null pointer, use `std::ptr::null()`
22 //~^ mismatched types [E0308]
23 //~| if you meant to create a null pointer, use `std::ptr::null_mut()`
25 //~^ mismatched types [E0308]
26 //~| if you meant to create a null pointer, use `std::ptr::null()`
28 //~^ mismatched types [E0308]
29 //~| if you meant to create a null pointer, use `std::ptr::null_mut()`