diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:29 +0000 |
commit | 631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch) | |
tree | a1b87c8f8cad01cf18f7c5f57a08f102771ed303 /tests/ui/consts/const-pattern-irrefutable.stderr | |
parent | Adding debian version 1.69.0+dfsg1-1. (diff) | |
download | rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/consts/const-pattern-irrefutable.stderr')
-rw-r--r-- | tests/ui/consts/const-pattern-irrefutable.stderr | 15 |
1 files changed, 6 insertions, 9 deletions
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 |