diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/moves/suggest-clone.fixed | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/moves/suggest-clone.fixed b/tests/ui/moves/suggest-clone.fixed new file mode 100644 index 000000000..204bfdb10 --- /dev/null +++ b/tests/ui/moves/suggest-clone.fixed @@ -0,0 +1,11 @@ +// run-rustfix + +#[derive(Clone)] +struct Foo; +impl Foo { + fn foo(self) {} +} +fn main() { + let foo = &Foo; + foo.clone().foo(); //~ ERROR cannot move out +} |