]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/rfc1445/issue-63479-match-fnptr.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / rfc1445 / issue-63479-match-fnptr.rs
index b3c91cec580bfc777b7b41c5827a5699c549a903..567685950e9e4aaf7d77fbf0efc02123285fafe2 100644 (file)
@@ -5,6 +5,8 @@
 // cover the case this hit; I've since expanded it accordingly, but the
 // experience left me wary of leaving this regression test out.)
 
+#![warn(pointer_structural_match)]
+
 #[derive(Eq)]
 struct A {
   a: i64
@@ -31,6 +33,8 @@ fn main() {
   let s = B(my_fn);
   match s {
     B(TEST) => println!("matched"),
+     //~^ WARN pointers in patterns behave unpredictably
+    //~| WARN this was previously accepted by the compiler but is being phased out
     _ => panic!("didn't match")
   };
 }