summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/clone-span-on-try-operator.fixed
blob: 4fad75b9a3d6179a258cb2de9227e0df563f065c (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 as Clone>::clone(&(*foo)).foo(); //~ ERROR cannot move out
}