summaryrefslogtreecommitdiffstats
path: root/tests/ui/moves/pin-mut-reborrow.fixed
blob: e808186d7d445a057e649d0a55de0b318a5c2988 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// run-rustfix
use std::pin::Pin;

struct Foo;

impl Foo {
    fn foo(self: Pin<&mut Self>) {}
}

fn main() {
    let mut foo = Foo;
    let mut foo = Pin::new(&mut foo);
    foo.as_mut().foo();
    foo.foo(); //~ ERROR use of moved value
}