// Check that we report an error if an upcast box is moved twice. trait Foo { fn dummy(&self); } fn consume(_: Box) { } fn foo(b: Box) { consume(b); consume(b); //~ ERROR use of moved value } fn main() { }