fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0308]: mismatched types 2 --> $DIR/issue-105494.rs:2:19 3 | 4LL | let _v: i32 = (1 as i32).to_string(); 5 | --- ^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `String` 6 | | 7 | expected due to this 8 | 9help: try removing the method call 10 | 11LL - let _v: i32 = (1 as i32).to_string(); 12LL + let _v: i32 = (1 as i32); 13 | 14 15error[E0308]: mismatched types 16 --> $DIR/issue-105494.rs:5:19 17 | 18LL | let _v: i32 = (1 as i128).to_string(); 19 | --- ^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `String` 20 | | 21 | expected due to this 22 23error[E0308]: mismatched types 24 --> $DIR/issue-105494.rs:7:20 25 | 26LL | let _v: &str = "foo".to_string(); 27 | ---- ^^^^^^^^^^^^^^^^^ expected `&str`, found `String` 28 | | 29 | expected due to this 30 | 31help: try removing the method call 32 | 33LL - let _v: &str = "foo".to_string(); 34LL + let _v: &str = "foo"; 35 | 36 37error[E0308]: mismatched types 38 --> $DIR/issue-105494.rs:14:12 39 | 40LL | let mut path: String = "/usr".to_string(); 41 | ------ expected due to this type 42... 43LL | path = format!("{}/{}", path, folder).as_str(); 44 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `String`, found `&str` 45 | 46help: try removing the method call 47 | 48LL - path = format!("{}/{}", path, folder).as_str(); 49LL + path = format!("{}/{}", path, folder); 50 | 51 52error: aborting due to 4 previous errors 53 54For more information about this error, try `rustc --explain E0308`.