]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/format-borrow.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / suggestions / format-borrow.stderr
CommitLineData
532ac7d7
XL
1error[E0308]: mismatched types
2 --> $DIR/format-borrow.rs:2:21
3 |
4LL | let a: String = &String::from("a");
94222f64
XL
5 | ------ ^^^^^^^^^^^^^^^^^^ expected struct `String`, found `&String`
6 | |
60c5eb7d 7 | expected due to this
94222f64
XL
8 |
9help: consider removing the borrow
10 |
11LL - let a: String = &String::from("a");
12LL + let a: String = String::from("a");
923072b8 13 |
532ac7d7
XL
14
15error[E0308]: mismatched types
16 --> $DIR/format-borrow.rs:4:21
17 |
18LL | let b: String = &format!("b");
94222f64
XL
19 | ------ ^^^^^^^^^^^^^ expected struct `String`, found `&String`
20 | |
60c5eb7d 21 | expected due to this
94222f64
XL
22 |
23help: consider removing the borrow
24 |
25LL - let b: String = &format!("b");
26LL + let b: String = format!("b");
923072b8 27 |
532ac7d7 28
17df50a5
XL
29error[E0308]: mismatched types
30 --> $DIR/format-borrow.rs:6:21
31 |
32LL | let c: String = &mut format!("c");
94222f64
XL
33 | ------ ^^^^^^^^^^^^^^^^^ expected struct `String`, found `&mut String`
34 | |
17df50a5 35 | expected due to this
94222f64
XL
36 |
37help: consider removing the borrow
38 |
39LL - let c: String = &mut format!("c");
40LL + let c: String = format!("c");
923072b8 41 |
17df50a5
XL
42
43error[E0308]: mismatched types
44 --> $DIR/format-borrow.rs:8:21
45 |
46LL | let d: String = &mut (format!("d"));
94222f64
XL
47 | ------ ^^^^^^^^^^^^^^^^^^^ expected struct `String`, found `&mut String`
48 | |
17df50a5 49 | expected due to this
94222f64
XL
50 |
51help: consider removing the borrow
52 |
53LL - let d: String = &mut (format!("d"));
54LL + let d: String = format!("d"));
923072b8 55 |
17df50a5
XL
56
57error: aborting due to 4 previous errors
532ac7d7
XL
58
59For more information about this error, try `rustc --explain E0308`.