summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-pattern-irrefutable.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/const-pattern-irrefutable.stderr')
-rw-r--r--tests/ui/consts/const-pattern-irrefutable.stderr15
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