1 error[E0005]: refutable pattern in local binding: `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered
2 --> $DIR/const-match-check.rs:4:22
4 LL | const X: i32 = { let 0 = 0; 0 };
5 | ^ patterns `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered
7 = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
8 = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
9 = note: the matched value is of type `i32`
10 help: you might want to use `if let` to ignore the variants that aren't matched
12 LL | const X: i32 = { if let 0 = 0 { todo!() } 0 };
14 help: alternatively, on nightly, you might want to use `#![feature(let_else)]` to handle the variants that aren't matched
16 LL | const X: i32 = { let 0 = 0 else { todo!() }; 0 };
19 error[E0005]: refutable pattern in local binding: `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered
20 --> $DIR/const-match-check.rs:8:23
22 LL | static Y: i32 = { let 0 = 0; 0 };
23 | ^ patterns `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered
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 help: you might want to use `if let` to ignore the variants that aren't matched
30 LL | static Y: i32 = { if let 0 = 0 { todo!() } 0 };
32 help: alternatively, on nightly, you might want to use `#![feature(let_else)]` to handle the variants that aren't matched
34 LL | static Y: i32 = { let 0 = 0 else { todo!() }; 0 };
37 error[E0005]: refutable pattern in local binding: `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered
38 --> $DIR/const-match-check.rs:13:26
40 LL | const X: i32 = { let 0 = 0; 0 };
41 | ^ patterns `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered
43 = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
44 = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
45 = note: the matched value is of type `i32`
46 help: you might want to use `if let` to ignore the variants that aren't matched
48 LL | const X: i32 = { if let 0 = 0 { todo!() } 0 };
50 help: alternatively, on nightly, you might want to use `#![feature(let_else)]` to handle the variants that aren't matched
52 LL | const X: i32 = { let 0 = 0 else { todo!() }; 0 };
55 error[E0005]: refutable pattern in local binding: `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered
56 --> $DIR/const-match-check.rs:19:26
58 LL | const X: i32 = { let 0 = 0; 0 };
59 | ^ patterns `i32::MIN..=-1_i32` and `1_i32..=i32::MAX` not covered
61 = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
62 = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
63 = note: the matched value is of type `i32`
64 help: you might want to use `if let` to ignore the variants that aren't matched
66 LL | const X: i32 = { if let 0 = 0 { todo!() } 0 };
68 help: alternatively, on nightly, you might want to use `#![feature(let_else)]` to handle the variants that aren't matched
70 LL | const X: i32 = { let 0 = 0 else { todo!() }; 0 };
73 error: aborting due to 4 previous errors
75 For more information about this error, try `rustc --explain E0005`.