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
41 | ^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
43 | cyclic type of infinite size
45 error[E0308]: mismatched types
46 --> $DIR/coerce-suggestions.rs:21:9
48 LL | s = format!("foo");
49 | ^^^^^^^^^^^^^^ expected `&mut String`, found struct `String`
51 = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
53 error: aborting due to 6 previous errors
55 For more information about this error, try `rustc --explain E0308`.