]>
Commit | Line | Data |
---|---|---|
8faf50e0 XL |
1 | #![feature(nll)] |
2 | ||
3 | struct X(usize); | |
4 | ||
5 | impl X { | |
6 | fn zap(&self) { | |
7 | //~^ HELP | |
8 | //~| SUGGESTION &mut self | |
9 | self.0 = 32; | |
10 | //~^ ERROR | |
11 | } | |
12 | } | |
13 | ||
14 | fn main() { | |
15 | let ref foo = 16; | |
16 | //~^ HELP | |
17 | //~| SUGGESTION ref mut foo | |
18 | *foo = 32; | |
19 | //~^ ERROR | |
20 | if let Some(ref bar) = Some(16) { | |
21 | //~^ HELP | |
22 | //~| SUGGESTION ref mut bar | |
23 | *bar = 32; | |
24 | //~^ ERROR | |
25 | } | |
26 | match 16 { | |
27 | ref quo => { *quo = 32; }, | |
28 | //~^ ERROR | |
29 | //~| HELP | |
30 | //~| SUGGESTION ref mut quo | |
31 | } | |
32 | } |