]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/pin-mut-reborrow.fixed
Rollup merge of #107576 - P1n3appl3:master, r=tmandry
[rust.git] / tests / ui / moves / pin-mut-reborrow.fixed
1 // run-rustfix
2 use std::pin::Pin;
3
4 struct Foo;
5
6 impl Foo {
7     fn foo(self: Pin<&mut Self>) {}
8 }
9
10 fn main() {
11     let mut foo = Foo;
12     let mut foo = Pin::new(&mut foo);
13     foo.as_mut().foo();
14     foo.foo(); //~ ERROR use of moved value
15 }