1 error[E0308]: mismatched types
2 --> $DIR/coerce-suggestions.rs:17:20
4 17 | let x: usize = String::new();
5 | ^^^^^^^^^^^^^ expected usize, found struct `std::string::String`
7 = note: expected type `usize`
8 found type `std::string::String`
9 = help: here are some functions which might fulfill your needs:
13 error[E0308]: mismatched types
14 --> $DIR/coerce-suggestions.rs:23:19
16 23 | let x: &str = String::new();
17 | ^^^^^^^^^^^^^ expected &str, found struct `std::string::String`
19 = note: expected type `&str`
20 found type `std::string::String`
21 = help: try with `&String::new()`
23 error[E0308]: mismatched types
24 --> $DIR/coerce-suggestions.rs:30:10
27 | ^^ types differ in mutability
29 = note: expected type `&mut std::string::String`
30 found type `&std::string::String`
32 error[E0308]: mismatched types
33 --> $DIR/coerce-suggestions.rs:35:11
36 | ^^ types differ in mutability
38 = note: expected type `&mut i32`
39 found type `&std::string::String`
41 error[E0308]: mismatched types
42 --> $DIR/coerce-suggestions.rs:41:9
45 | ^^^^^ cyclic type of infinite size
47 = note: expected type `_`
48 found type `std::boxed::Box<_>`
50 error: aborting due to 5 previous errors