rust/tests/ui/pattern/usefulness/issue-12116.stderr

17 lines
582 B
Plaintext

error: unreachable pattern
--> $DIR/issue-12116.rs:15:9
|
LL | &IntList::Cons(val, box ref next_list) => tail(next_list),
| -------------------------------------- matches all the relevant values
LL | &IntList::Cons(val, box IntList::Nil) => IntList::Cons(val, Box::new(IntList::Nil)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no value can reach this
|
note: the lint level is defined here
--> $DIR/issue-12116.rs:4:9
|
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error