rust/tests/ui/unsized/unsized7.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
348 B
Rust
Raw Normal View History

// Test sized-ness checking in substitution in impls.
2015-04-18 05:12:20 +00:00
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>);
2015-01-05 21:16:49 +00:00
impl<X: ?Sized + T> T1<X> for S3<X> {
2018-07-10 21:10:13 +00:00
//~^ ERROR the size for values of type
//~| ERROR not all trait items implemented
}
fn main() { }