]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/format-borrow.stderr
Remove E0308 note when primary label has all info
[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    |                     ^^^^^^^^^^^^^^^^^^
6    |                     |
7    |                     expected struct `std::string::String`, found &std::string::String
8    |                     help: consider removing the borrow: `String::from("a")`
9
10 error[E0308]: mismatched types
11   --> $DIR/format-borrow.rs:4:21
12    |
13 LL |     let b: String = &format!("b");
14    |                     ^^^^^^^^^^^^^
15    |                     |
16    |                     expected struct `std::string::String`, found &std::string::String
17    |                     help: consider removing the borrow: `format!("b")`
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0308`.