]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/uninhabited/uninhabited-irrefutable.rs
Suggest `if let`/`let_else` for refutable pat in `let`
[rust.git] / src / test / ui / uninhabited / uninhabited-irrefutable.rs
index 48cd92719b49ab51198e56727c30abd90b39ed79..661b5486adc122ca9cfe4f19d17ee0625f654304 100644 (file)
@@ -19,10 +19,10 @@ enum Foo {
     A(foo::SecretlyEmpty),
     B(foo::NotSoSecretlyEmpty),
     C(NotSoSecretlyEmpty),
-    D(u32),
+    D(u32, u32),
 }
 
 fn main() {
-    let x: Foo = Foo::D(123);
-    let Foo::D(_y) = x; //~ ERROR refutable pattern in local binding: `A(_)` not covered
+    let x: Foo = Foo::D(123, 456);
+    let Foo::D(_y, _z) = x; //~ ERROR refutable pattern in local binding: `A(_)` not covered
 }