01b75e20f2
to avoid going over the existing limit now that the ui-fulldeps tests have been moved to ui.
26 lines
324 B
Rust
26 lines
324 B
Rust
trait Foo {
|
|
fn f(&self);
|
|
}
|
|
|
|
struct Bar {
|
|
x: isize,
|
|
}
|
|
|
|
impl Drop for Bar {
|
|
fn drop(&mut self) {}
|
|
}
|
|
|
|
impl Foo for Bar {
|
|
fn f(&self) {
|
|
println!("hi");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
let x = Box::new(Bar { x: 10 });
|
|
let y: Box<dyn Foo> = x as Box<dyn Foo>;
|
|
let _z = y.clone(); //~ ERROR the method
|
|
}
|