diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-06-12 17:44:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-12 17:44:37 +0200 |
| commit | a5245b5894883d6a7803da96ed0899d2066177d4 (patch) | |
| tree | f1b13d47f49f0ff946373a4e55fc26e9e6f99e80 /tests/rustdoc-js-std/parser-errors.js | |
| parent | cb882fa998571e8a7ec1c06bb5d9dd9bc3423629 (diff) | |
| parent | 432ce39c8bb5520cdaea7a633c86eb11036a5985 (diff) | |
| download | rust-a5245b5894883d6a7803da96ed0899d2066177d4.tar.gz rust-a5245b5894883d6a7803da96ed0899d2066177d4.zip | |
Rollup merge of #112302 - jieyouxu:issue-85184, r=WaffleLapkin
Suggest using `ptr::null_mut` when user provided `ptr::null` to a function expecting `ptr::null_mut`
```
error[E0308]: mismatched types
--> $DIR/ptr-null-mutability-suggestions.rs:9:24
|
LL | expecting_null_mut(ptr::null());
| ------------------ ^^^^^^^^^^^
| | |
| | types differ in mutability
| | help: consider using `core::ptr::null_mut` instead: `core::ptr::null_mut()`
| 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) {}
| ^^^^^^^^^^^^^^^^^^ ----------
```
Closes #85184.
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions
