diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/consts/const-pattern-irrefutable.rs | 2 | ||||
| -rw-r--r-- | tests/ui/consts/const-pattern-irrefutable.stderr | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/consts/const-pattern-irrefutable.rs b/tests/ui/consts/const-pattern-irrefutable.rs index 54d2ad32386..c590ec8fcd3 100644 --- a/tests/ui/consts/const-pattern-irrefutable.rs +++ b/tests/ui/consts/const-pattern-irrefutable.rs @@ -1,6 +1,6 @@ mod foo { pub const b: u8 = 2; - //~^ missing patterns are not covered because `c` is interpreted as a constant pattern, not a new variable + //~^ missing patterns are not covered because `b` is interpreted as a constant pattern, not a new variable pub const d: u8 = 2; //~^ missing patterns are not covered because `d` is interpreted as a constant pattern, not a new variable } diff --git a/tests/ui/consts/const-pattern-irrefutable.stderr b/tests/ui/consts/const-pattern-irrefutable.stderr index d4365fa16e8..c118ce9e48f 100644 --- a/tests/ui/consts/const-pattern-irrefutable.stderr +++ b/tests/ui/consts/const-pattern-irrefutable.stderr @@ -18,13 +18,13 @@ error[E0005]: refutable pattern in local binding --> $DIR/const-pattern-irrefutable.rs:19:9 | LL | pub const b: u8 = 2; - | --------------- missing patterns are not covered because `c` is interpreted as a constant pattern, not a new variable + | --------------- missing patterns are not covered because `b` is interpreted as a constant pattern, not a new variable ... LL | let c = 4; | ^ | | | patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered - | help: introduce a variable instead: `c_var` + | help: introduce a variable instead: `b_var` | = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html |
