summaryrefslogtreecommitdiffstats
path: root/tests/ui/mir/issue-112269.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /tests/ui/mir/issue-112269.stderr
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/ui/mir/issue-112269.stderr31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/ui/mir/issue-112269.stderr b/tests/ui/mir/issue-112269.stderr
new file mode 100644
index 000000000..f5b796027
--- /dev/null
+++ b/tests/ui/mir/issue-112269.stderr
@@ -0,0 +1,31 @@
+error[E0005]: refutable pattern in local binding
+ --> $DIR/issue-112269.rs:3:9
+ |
+LL | let x: i32 = 3;
+ | ^
+ | |
+ | patterns `i32::MIN..=3_i32` and `5_i32..=i32::MAX` not covered
+ | missing patterns are not covered because `x` is interpreted as a constant pattern, not a new variable
+ | help: introduce a variable instead: `x_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 `i32`
+
+error[E0005]: refutable pattern in local binding
+ --> $DIR/issue-112269.rs:7:9
+ |
+LL | let y = 4;
+ | ^
+ | |
+ | patterns `i32::MIN..=2_i32` and `4_i32..=i32::MAX` not covered
+ | missing patterns are not covered because `y` is interpreted as a constant pattern, not a new variable
+ | help: introduce a variable instead: `y_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 `i32`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0005`.