]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/suggest-local-var-double-mut.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / suggest-local-var-double-mut.rs
1 // See issue #77834.
2
3 #![crate_type = "lib"]
4
5 mod method_syntax {
6     struct Foo;
7
8     impl Foo {
9         fn foo(&mut self, _: f32) -> i32 { todo!() }
10         fn bar(&mut self) -> f32 { todo!() }
11         fn baz(&mut self) {
12             self.foo(self.bar()); //~ ERROR
13         }
14     }
15 }
16
17 mod fully_qualified_syntax {
18     struct Foo;
19
20     impl Foo {
21         fn foo(&mut self, _: f32) -> i32 { todo!() }
22         fn bar(&mut self) -> f32 { todo!() }
23         fn baz(&mut self) {
24             Self::foo(self, Self::bar(self)); //~ ERROR
25         }
26     }
27 }