]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/issue-12116.rs
Fix test I broke
[rust.git] / src / test / compile-fail / issue-12116.rs
index 24765cfc2a671742ad375986ba6bccdd494f00a1..a8d2c55255340ceca1c776cd07723836805d1080 100644 (file)
@@ -10,6 +10,9 @@
 
 #![feature(box_patterns)]
 #![feature(box_syntax)]
+#![allow(dead_code)]
+#![allow(unused_variables)]
+#![deny(unreachable_patterns)]
 
 enum IntList {
     Cons(isize, Box<IntList>),
@@ -19,9 +22,8 @@ enum IntList {
 fn tail(source_list: &IntList) -> IntList {
     match source_list {
         &IntList::Cons(val, box ref next_list) => tail(next_list),
-        &IntList::Cons(val, box Nil)           => IntList::Cons(val, box Nil),
-//~^ ERROR cannot move out of borrowed content
-//~^^ WARN pattern binding `Nil` is named the same as one of the variants of the type `IntList`
+        &IntList::Cons(val, box IntList::Nil)  => IntList::Cons(val, box IntList::Nil),
+//~^ ERROR unreachable pattern
         _                          => panic!()
     }
 }