blob: aa1e79ac0d4a6dcc95f0603c59fd5bd7bb9ffb99 [file] [log] [blame]
error[E0308]: mismatched types
--> $DIR/ptr-null-mutability-suggestions.rs:9:24
|
LL | expecting_null_mut(ptr::null());
| ------------------ ^^^^^^^^^^^ types differ in mutability
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*mut u8`
found raw pointer `*const _`
note: function defined here
--> $DIR/ptr-null-mutability-suggestions.rs:6:4
|
LL | fn expecting_null_mut(_: *mut u8) {}
| ^^^^^^^^^^^^^^^^^^ ----------
help: consider using `core::ptr::null_mut` instead
|
LL - expecting_null_mut(ptr::null());
LL + expecting_null_mut(core::ptr::null_mut());
|
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.