From 631cd5845e8de329d0e227aaa707d7ea228b8f8f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:29 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/consts/const-pattern-irrefutable.stderr | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'tests/ui/consts/const-pattern-irrefutable.stderr') diff --git a/tests/ui/consts/const-pattern-irrefutable.stderr b/tests/ui/consts/const-pattern-irrefutable.stderr index c156ea161..2aed68bdd 100644 --- a/tests/ui/consts/const-pattern-irrefutable.stderr +++ b/tests/ui/consts/const-pattern-irrefutable.stderr @@ -1,9 +1,6 @@ error[E0005]: refutable pattern in local binding --> $DIR/const-pattern-irrefutable.rs:12:9 | -LL | const a: u8 = 2; - | ----------- constant defined here -... LL | let a = 4; | ^ | | @@ -11,14 +8,13 @@ LL | let a = 4; | missing patterns are not covered because `a` is interpreted as a constant pattern, not a new variable | help: introduce a variable instead: `a_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 = note: the matched value is of type `u8` error[E0005]: refutable pattern in local binding --> $DIR/const-pattern-irrefutable.rs:17:9 | -LL | pub const b: u8 = 2; - | --------------- constant defined here -... LL | let c = 4; | ^ | | @@ -26,14 +22,13 @@ LL | let c = 4; | missing patterns are not covered because `c` is interpreted as a constant pattern, not a new variable | help: introduce a variable instead: `c_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 = note: the matched value is of type `u8` error[E0005]: refutable pattern in local binding --> $DIR/const-pattern-irrefutable.rs:22:9 | -LL | pub const d: u8 = 2; - | --------------- constant defined here -... LL | let d = 4; | ^ | | @@ -41,6 +36,8 @@ LL | let d = 4; | missing patterns are not covered because `d` is interpreted as a constant pattern, not a new variable | help: introduce a variable instead: `d_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 = note: the matched value is of type `u8` error: aborting due to 3 previous errors -- cgit v1.2.3