diff options
Diffstat (limited to 'src/test/ui/unsized/unsized-trait-impl-self-type.rs')
-rw-r--r-- | src/test/ui/unsized/unsized-trait-impl-self-type.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/unsized/unsized-trait-impl-self-type.rs b/src/test/ui/unsized/unsized-trait-impl-self-type.rs new file mode 100644 index 000000000..df571a833 --- /dev/null +++ b/src/test/ui/unsized/unsized-trait-impl-self-type.rs @@ -0,0 +1,14 @@ +// Test sized-ness checking in substitution in impls. + +// impl - struct +trait T3<Z: ?Sized> { + fn foo(&self, z: &Z); +} + +struct S5<Y>(Y); + +impl<X: ?Sized> T3<X> for S5<X> { + //~^ ERROR the size for values of type +} + +fn main() { } |