summaryrefslogtreecommitdiffstats
path: root/src/test/ui/unsized/unsized7.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/unsized/unsized7.rs')
-rw-r--r--src/test/ui/unsized/unsized7.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/unsized/unsized7.rs b/src/test/ui/unsized/unsized7.rs
new file mode 100644
index 000000000..422a78481
--- /dev/null
+++ b/src/test/ui/unsized/unsized7.rs
@@ -0,0 +1,16 @@
+// Test sized-ness checking in substitution in impls.
+
+trait T {}
+
+// I would like these to fail eventually.
+// impl - bounded
+trait T1<Z: T> {
+ fn dummy(&self) -> Z;
+}
+
+struct S3<Y: ?Sized>(Box<Y>);
+impl<X: ?Sized + T> T1<X> for S3<X> {
+ //~^ ERROR the size for values of type
+}
+
+fn main() { }