fork/rust

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

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

master
518 B17 linesraw
1error: comparing with null is better expressed by the `.is_null()` method
2  --> $DIR/cmp_null.rs:9:8
3   |
4LL |     if p == ptr::null() {
5   |        ^^^^^^^^^^^^^^^^
6   |
7   = note: `-D clippy::cmp-null` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::cmp_null)]`
9
10error: comparing with null is better expressed by the `.is_null()` method
11  --> $DIR/cmp_null.rs:16:8
12   |
13LL |     if m == ptr::null_mut() {
14   |        ^^^^^^^^^^^^^^^^^^^^
15
16error: aborting due to 2 previous errors
17