Skip to content

Commit f8c4d10

Browse files
committed
Fix test I broke
1 parent 56f355c commit f8c4d10

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/test/compile-fail/issue-12116.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
#![feature(box_patterns)]
1212
#![feature(box_syntax)]
13+
#![allow(dead_code)]
14+
#![allow(unused_variables)]
15+
#![deny(unreachable_patterns)]
1316

1417
enum IntList {
1518
Cons(isize, Box<IntList>),
@@ -19,9 +22,8 @@ enum IntList {
1922
fn tail(source_list: &IntList) -> IntList {
2023
match source_list {
2124
&IntList::Cons(val, box ref next_list) => tail(next_list),
22-
&IntList::Cons(val, box Nil) => IntList::Cons(val, box Nil),
23-
//~^ ERROR cannot move out of borrowed content
24-
//~^^ WARN pattern binding `Nil` is named the same as one of the variants of the type `IntList`
25+
&IntList::Cons(val, box IntList::Nil) => IntList::Cons(val, box IntList::Nil),
26+
//~^ ERROR unreachable pattern
2527
_ => panic!()
2628
}
2729
}

0 commit comments

Comments
 (0)