]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/format-borrow.stderr
Rollup merge of #97149 - ChrisDenton:win_async_pipes, r=m-ou-se
[rust.git] / src / test / ui / suggestions / format-borrow.stderr
1 error[E0308]: mismatched types
2   --> $DIR/format-borrow.rs:2:21
3    |
4 LL |     let a: String = &String::from("a");
5    |            ------   ^^^^^^^^^^^^^^^^^^ expected struct `String`, found `&String`
6    |            |
7    |            expected due to this
8    |
9 help: consider removing the borrow
10    |
11 LL -     let a: String = &String::from("a");
12 LL +     let a: String = String::from("a");
13    |
14
15 error[E0308]: mismatched types
16   --> $DIR/format-borrow.rs:4:21
17    |
18 LL |     let b: String = &format!("b");
19    |            ------   ^^^^^^^^^^^^^ expected struct `String`, found `&String`
20    |            |
21    |            expected due to this
22    |
23 help: consider removing the borrow
24    |
25 LL -     let b: String = &format!("b");
26 LL +     let b: String = format!("b");
27    |
28
29 error[E0308]: mismatched types
30   --> $DIR/format-borrow.rs:6:21
31    |
32 LL |     let c: String = &mut format!("c");
33    |            ------   ^^^^^^^^^^^^^^^^^ expected struct `String`, found `&mut String`
34    |            |
35    |            expected due to this
36    |
37 help: consider removing the borrow
38    |
39 LL -     let c: String = &mut format!("c");
40 LL +     let c: String = format!("c");
41    |
42
43 error[E0308]: mismatched types
44   --> $DIR/format-borrow.rs:8:21
45    |
46 LL |     let d: String = &mut (format!("d"));
47    |            ------   ^^^^^^^^^^^^^^^^^^^ expected struct `String`, found `&mut String`
48    |            |
49    |            expected due to this
50    |
51 help: consider removing the borrow
52    |
53 LL -     let d: String = &mut (format!("d"));
54 LL +     let d: String = format!("d"));
55    |
56
57 error: aborting due to 4 previous errors
58
59 For more information about this error, try `rustc --explain E0308`.