summaryrefslogtreecommitdiffstats
path: root/src/test/ui/coercion/issue-53475.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/coercion/issue-53475.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/coercion/issue-53475.rs b/src/test/ui/coercion/issue-53475.rs
new file mode 100644
index 000000000..3770c024f
--- /dev/null
+++ b/src/test/ui/coercion/issue-53475.rs
@@ -0,0 +1,13 @@
+#![feature(coerce_unsized)]
+
+use std::any::Any;
+use std::ops::CoerceUnsized;
+
+struct Foo<T> {
+ data: Box<T>,
+}
+
+impl<T> CoerceUnsized<Foo<dyn Any>> for Foo<T> {}
+//~^ ERROR the parameter type `T` may not live long enough
+
+fn main() {}