]>
Commit | Line | Data |
---|---|---|
dc9dc135 XL |
1 | error[E0308]: mismatched types |
2 | --> $DIR/mut-ref-reassignment.rs:2:11 | |
3 | | | |
4 | LL | opt = None; | |
1b1a35ee | 5 | | ^^^^ expected mutable reference, found enum `Option` |
dc9dc135 | 6 | | |
1b1a35ee XL |
7 | = note: expected mutable reference `&mut Option<String>` |
8 | found enum `Option<_>` | |
dc9dc135 XL |
9 | help: consider dereferencing here to assign to the mutable borrowed piece of memory |
10 | | | |
11 | LL | *opt = None; | |
12 | | ^^^^ | |
13 | ||
14 | error[E0308]: mismatched types | |
15 | --> $DIR/mut-ref-reassignment.rs:6:11 | |
16 | | | |
17 | LL | opt = None | |
1b1a35ee | 18 | | ^^^^ expected mutable reference, found enum `Option` |
dc9dc135 | 19 | | |
1b1a35ee XL |
20 | = note: expected mutable reference `&mut std::result::Result<String, ()>` |
21 | found enum `Option<_>` | |
dc9dc135 XL |
22 | |
23 | error[E0308]: mismatched types | |
24 | --> $DIR/mut-ref-reassignment.rs:10:11 | |
25 | | | |
26 | LL | opt = Some(String::new()) | |
1b1a35ee | 27 | | ^^^^^^^^^^^^^^^^^^^ expected mutable reference, found enum `Option` |
dc9dc135 | 28 | | |
1b1a35ee XL |
29 | = note: expected mutable reference `&mut Option<String>` |
30 | found enum `Option<String>` | |
dc9dc135 XL |
31 | help: consider dereferencing here to assign to the mutable borrowed piece of memory |
32 | | | |
33 | LL | *opt = Some(String::new()) | |
34 | | ^^^^ | |
35 | ||
36 | error[E0308]: mismatched types | |
37 | --> $DIR/mut-ref-reassignment.rs:14:11 | |
38 | | | |
39 | LL | opt = Some(42) | |
1b1a35ee | 40 | | ^^^^^^^^ expected mutable reference, found enum `Option` |
dc9dc135 | 41 | | |
1b1a35ee XL |
42 | = note: expected mutable reference `&mut Option<String>` |
43 | found enum `Option<{integer}>` | |
dc9dc135 XL |
44 | |
45 | error: aborting due to 4 previous errors | |
46 | ||
47 | For more information about this error, try `rustc --explain E0308`. |