rust/tests/ui/unsized/unsized7.rs

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

17 lines
301 B
Rust
Raw Normal View History

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