]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / const-pat-non-exaustive-let-new-var.stderr
1 error[E0005]: refutable pattern in local binding
2   --> $DIR/const-pat-non-exaustive-let-new-var.rs:2:9
3    |
4 LL |     let A = 3;
5    |         ^
6    |         |
7    |         patterns `i32::MIN..=1_i32` and `3_i32..=i32::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 LL |     const A: i32 = 2;
12    |     ------------ constant defined here
13    |
14    = note: the matched value is of type `i32`
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0005`.