]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/issue-68049-2.rs
Rollup merge of #105795 - nicholasbishop:bishop-stabilize-efiapi, r=joshtriplett
[rust.git] / tests / ui / suggestions / issue-68049-2.rs
1 trait Hello {
2   fn example(&self, input: &i32); // should suggest here
3 }
4
5 struct Test1(i32);
6
7 impl Hello for Test1 {
8   fn example(&self, input: &i32) { // should not suggest here
9       *input = self.0; //~ ERROR cannot assign
10   }
11 }
12
13 struct Test2(i32);
14
15 impl Hello for Test2 {
16   fn example(&self, input: &i32) { // should not suggest here
17     self.0 += *input; //~ ERROR cannot assign
18   }
19 }
20
21 fn main() { }