rust/src/test/ui/issues/issue-38604.rs
2018-12-25 21:08:33 -07:00

17 lines
320 B
Rust

trait Q<T:?Sized> {}
trait Foo where u32: Q<Self> {
fn foo(&self);
}
impl Q<()> for u32 {}
impl Foo for () {
fn foo(&self) {
println!("foo!");
}
}
fn main() {
let _f: Box<Foo> = //~ ERROR `Foo` cannot be made into an object
Box::new(()); //~ ERROR `Foo` cannot be made into an object
}