os-rust/tests/ui/pattern/usefulness/match-vec-unreachable.stderr

32 lines
1,022 B
Text

error: unreachable pattern
--> $DIR/match-vec-unreachable.rs:8:9
|
LL | [a, (2, 3), _] => (),
| -------------- matches all the values already
LL | [(1, 2), (2, 3), b] => (),
| ^^^^^^^^^^^^^^^^^^^ unreachable pattern
|
note: the lint level is defined here
--> $DIR/match-vec-unreachable.rs:1:9
|
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
error: unreachable pattern
--> $DIR/match-vec-unreachable.rs:18:9
|
LL | [ref a, _, _, ..] => { println!("{}", a); }
| ----------------- matches all the values already
LL | [_, _, _, _, _] => { }
| ^^^^^^^^^^^^^^^ unreachable pattern
error: unreachable pattern
--> $DIR/match-vec-unreachable.rs:26:9
|
LL | ['a', 'b', 'c', ref _tail @ ..] => {}
| ------------------------------- matches all the values already
LL | ['a', 'b', 'c'] => {}
| ^^^^^^^^^^^^^^^ unreachable pattern
error: aborting due to 3 previous errors