about summary refs log tree commit diff
path: root/tests/ui/moves/suggest-clone.rs
blob: 0b3c5e283d2ca302c19b916199471982288c62b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
//@ run-rustfix

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