about summary refs log tree commit diff
path: root/tests/ui/cmp_null.fixed
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2025-02-27 21:40:02 +0100
committerPhilipp Krones <hello@philkrones.com>2025-02-27 21:51:42 +0100
commit02e812af4d936a0984802bb76bb3e423e2fb94a5 (patch)
tree196fe8bde7074c1a5fa2b0af4a74892c51c8188c /tests/ui/cmp_null.fixed
parent17bda0c0febb8c51fb14a6856d365eab86fc6162 (diff)
parent15180d4eb9dcff9441a8c3ff3382804123c5b0a1 (diff)
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'tests/ui/cmp_null.fixed')
-rw-r--r--tests/ui/cmp_null.fixed15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/ui/cmp_null.fixed b/tests/ui/cmp_null.fixed
index e5ab765bc86..140ddb10aeb 100644
--- a/tests/ui/cmp_null.fixed
+++ b/tests/ui/cmp_null.fixed
@@ -7,26 +7,29 @@ fn main() {
     let x = 0;
     let p: *const usize = &x;
     if p.is_null() {
-        //~^ ERROR: comparing with null is better expressed by the `.is_null()` method
-        //~| NOTE: `-D clippy::cmp-null` implied by `-D warnings`
+        //~^ cmp_null
+
         println!("This is surprising!");
     }
     if p.is_null() {
-        //~^ ERROR: comparing with null is better expressed by the `.is_null()` method
+        //~^ cmp_null
+
         println!("This is surprising!");
     }
 
     let mut y = 0;
     let mut m: *mut usize = &mut y;
     if m.is_null() {
-        //~^ ERROR: comparing with null is better expressed by the `.is_null()` method
+        //~^ cmp_null
+
         println!("This is surprising, too!");
     }
     if m.is_null() {
-        //~^ ERROR: comparing with null is better expressed by the `.is_null()` method
+        //~^ cmp_null
+
         println!("This is surprising, too!");
     }
 
     let _ = (x as *const ()).is_null();
-    //~^ ERROR: comparing with null is better expressed by the `.is_null()` method
+    //~^ cmp_null
 }