fork/rust

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

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

master
1.4 KiB31 linesraw
1error[E0005]: refutable pattern in local binding
2  --> $DIR/issue-112269.rs:3:9
3   |
4LL |     let x: i32 = 3;
5   |         ^
6   |         |
7   |         patterns `i32::MIN..=3_i32` and `5_i32..=i32::MAX` not covered
8   |         missing patterns are not covered because `x` is interpreted as a constant pattern, not a new variable
9   |         help: introduce a variable instead: `x_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 `i32`
14
15error[E0005]: refutable pattern in local binding
16  --> $DIR/issue-112269.rs:7:9
17   |
18LL |     let y = 4;
19   |         ^
20   |         |
21   |         patterns `i32::MIN..=2_i32` and `4_i32..=i32::MAX` not covered
22   |         missing patterns are not covered because `y` is interpreted as a constant pattern, not a new variable
23   |         help: introduce a variable instead: `y_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 `i32`
28
29error: aborting due to 2 previous errors
30
31For more information about this error, try `rustc --explain E0005`.