fork/rust

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

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

master
1.2 KiB28 linesraw
1error[E0004]: non-exhaustive patterns: `i32::MIN..=0_i32` and `2_i32..=i32::MAX` not covered
2  --> $DIR/match-non-exhaustive.rs:2:11
3   |
4LL |     match 0 { 1 => () }
5   |           ^ patterns `i32::MIN..=0_i32` and `2_i32..=i32::MAX` not covered
6   |
7   = note: the matched value is of type `i32`
8help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
9   |
10LL |     match 0 { 1 => (), i32::MIN..=0_i32 | 2_i32..=i32::MAX => todo!() }
11   |                      ++++++++++++++++++++++++++++++++++++++++++++++++
12
13error[E0004]: non-exhaustive patterns: `_` not covered
14  --> $DIR/match-non-exhaustive.rs:3:11
15   |
16LL |     match 0 { 0 if false => () }
17   |           ^ pattern `_` not covered
18   |
19   = note: the matched value is of type `i32`
20   = note: match arms with guards don't count towards exhaustivity
21help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
22   |
23LL |     match 0 { 0 if false => (), _ => todo!() }
24   |                               ++++++++++++++
25
26error: aborting due to 2 previous errors
27
28For more information about this error, try `rustc --explain E0004`.