]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/mut-ref-reassignment.stderr
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / suggestions / mut-ref-reassignment.stderr
CommitLineData
dc9dc135
XL
1error[E0308]: mismatched types
2 --> $DIR/mut-ref-reassignment.rs:2:11
3 |
4LL | 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
9help: consider dereferencing here to assign to the mutable borrowed piece of memory
10 |
11LL | *opt = None;
12 | ^^^^
13
14error[E0308]: mismatched types
15 --> $DIR/mut-ref-reassignment.rs:6:11
16 |
17LL | opt = None
1b1a35ee 18 | ^^^^ expected mutable reference, found enum `Option`
dc9dc135 19 |
6a06907d 20 = note: expected mutable reference `&mut Result<String, ()>`
1b1a35ee 21 found enum `Option<_>`
dc9dc135
XL
22
23error[E0308]: mismatched types
24 --> $DIR/mut-ref-reassignment.rs:10:11
25 |
26LL | 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
31help: consider dereferencing here to assign to the mutable borrowed piece of memory
32 |
33LL | *opt = Some(String::new())
34 | ^^^^
35
36error[E0308]: mismatched types
37 --> $DIR/mut-ref-reassignment.rs:14:11
38 |
39LL | 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
45error: aborting due to 4 previous errors
46
47For more information about this error, try `rustc --explain E0308`.