2021-05-08 19:56:59 -05:00
|
|
|
trait Hello {
|
|
|
|
fn example(&self, input: &i32); // should suggest here
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Test1(i32);
|
|
|
|
|
|
|
|
impl Hello for Test1 {
|
|
|
|
fn example(&self, input: &i32) { // should not suggest here
|
2021-05-10 23:20:43 -05:00
|
|
|
*input = self.0; //~ ERROR cannot assign
|
2021-05-08 19:56:59 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Test2(i32);
|
|
|
|
|
|
|
|
impl Hello for Test2 {
|
|
|
|
fn example(&self, input: &i32) { // should not suggest here
|
2021-05-10 23:20:43 -05:00
|
|
|
self.0 += *input; //~ ERROR cannot assign
|
2021-05-08 19:56:59 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|