summary refs log tree commit diff
path: root/src/test/ui/suggestions/format-borrow.stderr
blob: 0881b024712c5daa1c75b39100f5e4a420d6cbba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
error[E0308]: mismatched types
  --> $DIR/format-borrow.rs:2:21
   |
LL |     let a: String = &String::from("a");
   |            ------   ^^^^^^^^^^^^^^^^^^
   |            |        |
   |            |        expected struct `String`, found `&String`
   |            |        help: consider removing the borrow: `String::from("a")`
   |            expected due to this

error[E0308]: mismatched types
  --> $DIR/format-borrow.rs:4:21
   |
LL |     let b: String = &format!("b");
   |            ------   ^^^^^^^^^^^^^
   |            |        |
   |            |        expected struct `String`, found `&String`
   |            |        help: consider removing the borrow: `format!("b")`
   |            expected due to this

error[E0308]: mismatched types
  --> $DIR/format-borrow.rs:6:21
   |
LL |     let c: String = &mut format!("c");
   |            ------   ^^^^^^^^^^^^^^^^^
   |            |        |
   |            |        expected struct `String`, found `&mut String`
   |            |        help: consider removing the borrow: `format!("c")`
   |            expected due to this

error[E0308]: mismatched types
  --> $DIR/format-borrow.rs:8:21
   |
LL |     let d: String = &mut (format!("d"));
   |            ------   ^^^^^^^^^^^^^^^^^^^
   |            |        |
   |            |        expected struct `String`, found `&mut String`
   |            |        help: consider removing the borrow: `format!("d")`
   |            expected due to this

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0308`.