summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-6318.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/issues/issue-6318.rs')
-rw-r--r--src/test/ui/issues/issue-6318.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-6318.rs b/src/test/ui/issues/issue-6318.rs
new file mode 100644
index 000000000..d8bd83f0d
--- /dev/null
+++ b/src/test/ui/issues/issue-6318.rs
@@ -0,0 +1,22 @@
+// run-pass
+// pretty-expanded FIXME #23616
+
+#![feature(box_syntax)]
+
+pub enum Thing {
+ A(Box<dyn Foo+'static>)
+}
+
+pub trait Foo {
+ fn dummy(&self) { }
+}
+
+pub struct Struct;
+
+impl Foo for Struct {}
+
+pub fn main() {
+ match Thing::A(box Struct as Box<dyn Foo + 'static>) {
+ Thing::A(_a) => 0,
+ };
+}