fork/rust

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

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

master
2.0 KiB45 linesraw
1error[E0005]: refutable pattern in local binding
2  --> $DIR/const-pattern-irrefutable.rs:12:9
3   |
4LL |     let a = 4;
5   |         ^
6   |         |
7   |         patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered
8   |         missing patterns are not covered because `a` is interpreted as a constant pattern, not a new variable
9   |         help: introduce a variable instead: `a_var`
10   |
11   = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
12   = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
13   = note: the matched value is of type `u8`
14
15error[E0005]: refutable pattern in local binding
16  --> $DIR/const-pattern-irrefutable.rs:17:9
17   |
18LL |     let c = 4;
19   |         ^
20   |         |
21   |         patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered
22   |         missing patterns are not covered because `c` is interpreted as a constant pattern, not a new variable
23   |         help: introduce a variable instead: `c_var`
24   |
25   = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
26   = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
27   = note: the matched value is of type `u8`
28
29error[E0005]: refutable pattern in local binding
30  --> $DIR/const-pattern-irrefutable.rs:22:9
31   |
32LL |     let d = 4;
33   |         ^
34   |         |
35   |         patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered
36   |         missing patterns are not covered because `d` is interpreted as a constant pattern, not a new variable
37   |         help: introduce a variable instead: `d_var`
38   |
39   = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
40   = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
41   = note: the matched value is of type `u8`
42
43error: aborting due to 3 previous errors
44
45For more information about this error, try `rustc --explain E0005`.