summaryrefslogtreecommitdiffstats
path: root/tests/ui/match
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/match
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 'tests/ui/match')
-rw-r--r--tests/ui/match/issue-112438.rs11
-rw-r--r--tests/ui/match/issue-113012.rs12
-rw-r--r--tests/ui/match/issue-70972-dyn-trait.rs2
-rw-r--r--tests/ui/match/issue-70972-dyn-trait.stderr2
4 files changed, 25 insertions, 2 deletions
diff --git a/tests/ui/match/issue-112438.rs b/tests/ui/match/issue-112438.rs
new file mode 100644
index 000000000..15f380f7f
--- /dev/null
+++ b/tests/ui/match/issue-112438.rs
@@ -0,0 +1,11 @@
+// run-pass
+#![feature(inline_const_pat)]
+#![allow(dead_code)]
+#![allow(incomplete_features)]
+fn foo<const V: usize>() {
+ match 0 {
+ const { 1 << 5 } | _ => {}
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/match/issue-113012.rs b/tests/ui/match/issue-113012.rs
new file mode 100644
index 000000000..da7a8b65b
--- /dev/null
+++ b/tests/ui/match/issue-113012.rs
@@ -0,0 +1,12 @@
+// run-pass
+
+#![allow(dead_code)]
+struct Foo(());
+
+const FOO: Foo = Foo(match 0 {
+ 0.. => (),
+ _ => (),
+});
+
+fn main() {
+}
diff --git a/tests/ui/match/issue-70972-dyn-trait.rs b/tests/ui/match/issue-70972-dyn-trait.rs
index 97d161c59..df28c474a 100644
--- a/tests/ui/match/issue-70972-dyn-trait.rs
+++ b/tests/ui/match/issue-70972-dyn-trait.rs
@@ -4,7 +4,7 @@ fn main() {
let a: &dyn Send = &7u32;
match a {
F => panic!(),
- //~^ ERROR `&dyn Send` cannot be used in patterns
+ //~^ ERROR `dyn Send` cannot be used in patterns
_ => {}
}
}
diff --git a/tests/ui/match/issue-70972-dyn-trait.stderr b/tests/ui/match/issue-70972-dyn-trait.stderr
index 7581070eb..f4dc910c3 100644
--- a/tests/ui/match/issue-70972-dyn-trait.stderr
+++ b/tests/ui/match/issue-70972-dyn-trait.stderr
@@ -1,4 +1,4 @@
-error: `&dyn Send` cannot be used in patterns
+error: `dyn Send` cannot be used in patterns
--> $DIR/issue-70972-dyn-trait.rs:6:9
|
LL | F => panic!(),