]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/const-pat-non-exaustive-let-new-var.rs
Rollup merge of #107264 - ferrocene:pa-private-items, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / const-pat-non-exaustive-let-new-var.rs
1 fn main() {
2     let A = 3;
3     //~^ ERROR refutable pattern in local binding
4     //~| patterns `i32::MIN..=1_i32` and `3_i32..=i32::MAX` not covered
5     //~| missing patterns are not covered because `a` is interpreted as a constant pattern, not a new variable
6     //~| HELP introduce a variable instead
7     //~| SUGGESTION a_var
8
9     const A: i32 = 2;
10     //~^ constant defined here
11 }