]> 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 0f8b0a6c238d08f03c4d2ae88554f4c3775313e5..0c3ea53a903ae9062c03098e6ee2838a975b4a1a 100644 (file)
@@ -19,16 +19,13 @@ fn main() {
     };
 
     let x: &Void = unsafe { std::mem::uninitialized() };
-    let _ = match x {};
-    //~^ ERROR non-exhaustive
+    let _ = match x {}; //~ ERROR non-exhaustive
 
     let x: (Void,) = unsafe { std::mem::uninitialized() };
-    let _ = match x {};
-    //~^ ERROR non-exhaustive
+    let _ = match x {}; //~ ERROR non-exhaustive
 
     let x: [Void; 1] = unsafe { std::mem::uninitialized() };
-    let _ = match x {};
-    //~^ ERROR non-exhaustive
+    let _ = match x {}; //~ ERROR non-exhaustive
 
     let x: &[Void] = unsafe { std::mem::uninitialized() };
     let _ = match x {   //~ ERROR non-exhaustive
@@ -47,4 +44,3 @@ fn main() {
     let Ok(x) = x;
     //~^ ERROR refutable
 }
-