Files
rust/tests/ui/borrowck/clone-span-on-try-operator.fixed
T

12 lines
162 B
Rust

//@ run-rustfix
#[derive(Clone)]
struct Foo;
impl Foo {
fn foo(self) {}
}
fn main() {
let foo = &Foo;
foo.clone().foo(); //~ ERROR cannot move out
}