summaryrefslogtreecommitdiffstats
path: root/tests/ui/error-codes/E0377.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/error-codes/E0377.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0377.rs b/tests/ui/error-codes/E0377.rs
new file mode 100644
index 000000000..6da2c2095
--- /dev/null
+++ b/tests/ui/error-codes/E0377.rs
@@ -0,0 +1,14 @@
+#![feature(coerce_unsized)]
+use std::ops::CoerceUnsized;
+
+pub struct Foo<T: ?Sized> {
+ field_with_unsized_type: T,
+}
+
+pub struct Bar<T: ?Sized> {
+ field_with_unsized_type: T,
+}
+
+impl<T, U> CoerceUnsized<Bar<U>> for Foo<T> where T: CoerceUnsized<U> {} //~ ERROR E0377
+
+fn main() {}