]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/uninhabited-matches-feature-gated.rs
use a more conservative inhabitableness rule
[rust.git] / src / test / compile-fail / uninhabited-matches-feature-gated.rs
index 68781a407cc00e5f550e7182436d8cdc0b989679..0c3ea53a903ae9062c03098e6ee2838a975b4a1a 100644 (file)
@@ -19,13 +19,13 @@ fn main() {
     };
 
     let x: &Void = unsafe { std::mem::uninitialized() };
-    let _ = match x {}; // okay
+    let _ = match x {}; //~ ERROR non-exhaustive
 
     let x: (Void,) = unsafe { std::mem::uninitialized() };
-    let _ = match x {}; // okay
+    let _ = match x {}; //~ ERROR non-exhaustive
 
     let x: [Void; 1] = unsafe { std::mem::uninitialized() };
-    let _ = match x {}; // okay
+    let _ = match x {}; //~ ERROR non-exhaustive
 
     let x: &[Void] = unsafe { std::mem::uninitialized() };
     let _ = match x {   //~ ERROR non-exhaustive