1 error[E0308]: mismatched types
2 --> $DIR/coerce-suggestions.rs:7:20
4 LL | let x: usize = String::new();
5 | ----- ^^^^^^^^^^^^^ expected `usize`, found struct `String`
9 error[E0308]: mismatched types
10 --> $DIR/coerce-suggestions.rs:9:19
12 LL | let x: &str = String::new();
15 | | expected `&str`, found struct `String`
16 | | help: consider borrowing here: `&String::new()`
17 | expected due to this
19 error[E0308]: mismatched types
20 --> $DIR/coerce-suggestions.rs:12:10
23 | ^^ types differ in mutability
25 = note: expected mutable reference `&mut String`
26 found reference `&String`
28 error[E0308]: mismatched types
29 --> $DIR/coerce-suggestions.rs:14:11
32 | ^^ types differ in mutability
34 = note: expected mutable reference `&mut i32`
35 found reference `&String`
37 error[E0308]: mismatched types
38 --> $DIR/coerce-suggestions.rs:17:9
43 | cyclic type of infinite size
44 | help: try using a conversion method: `(box f).to_string()`
46 error[E0308]: mismatched types
47 --> $DIR/coerce-suggestions.rs:21:9
49 LL | s = format!("foo");
50 | ^^^^^^^^^^^^^^ expected `&mut String`, found struct `String`
52 = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
54 error: aborting due to 6 previous errors
56 For more information about this error, try `rustc --explain E0308`.