summaryrefslogtreecommitdiffstats
path: root/tests/ui/match/issue-70972-dyn-trait.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/match/issue-70972-dyn-trait.rs')
-rw-r--r--tests/ui/match/issue-70972-dyn-trait.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/match/issue-70972-dyn-trait.rs b/tests/ui/match/issue-70972-dyn-trait.rs
new file mode 100644
index 000000000..97d161c59
--- /dev/null
+++ b/tests/ui/match/issue-70972-dyn-trait.rs
@@ -0,0 +1,10 @@
+const F: &'static dyn Send = &7u32;
+
+fn main() {
+ let a: &dyn Send = &7u32;
+ match a {
+ F => panic!(),
+ //~^ ERROR `&dyn Send` cannot be used in patterns
+ _ => {}
+ }
+}