rust/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
385 B
Rust
Raw Normal View History

fn main() {
let A = 3;
2022-12-23 14:02:23 -06:00
//~^ ERROR refutable pattern in local binding
//~| patterns `i32::MIN..=1_i32` and `3_i32..=i32::MAX` not covered
//~| missing patterns are not covered because `a` is interpreted as a constant pattern, not a new variable
//~| HELP introduce a variable instead
//~| SUGGESTION a_var
const A: i32 = 2;
//~^ constant defined here
}