fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.2 KiB34 linesraw
1error[E0004]: non-exhaustive patterns: `(Some(&[]), Err(_))` not covered
2  --> $DIR/non-exhaustive-match-nested.rs:5:11
3   |
4LL |     match (l1, l2) {
5   |           ^^^^^^^^ pattern `(Some(&[]), Err(_))` not covered
6   |
7   = note: the matched value is of type `(Option<&[T]>, Result<&[T], ()>)`
8help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
9   |
10LL ~         (None, Ok(&[_, _, ..])) => "None, Ok(at least two elements)",
11LL +         (Some(&[]), Err(_)) => todo!()
12   |
13
14error[E0004]: non-exhaustive patterns: `T::A(U::C)` not covered
15  --> $DIR/non-exhaustive-match-nested.rs:15:11
16   |
17LL |     match x {
18   |           ^ pattern `T::A(U::C)` not covered
19   |
20note: `T` defined here
21  --> $DIR/non-exhaustive-match-nested.rs:1:10
22   |
23LL | enum T { A(U), B }
24   |      -   ^ not covered
25   = note: the matched value is of type `T`
26help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
27   |
28LL ~         T::B => { panic!("goodbye"); },
29LL +         T::A(U::C) => todo!()
30   |
31
32error: aborting due to 2 previous errors
33
34For more information about this error, try `rustc --explain E0004`.