]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/issue-105494.rs
Auto merge of #106121 - RalfJung:miri, r=RalfJung
[rust.git] / src / test / ui / suggestions / issue-105494.rs
1 fn test1() {
2     let _v: i32 = (1 as i32).to_string(); //~ ERROR mismatched types
3
4     // won't suggestion
5     let _v: i32 = (1 as i128).to_string(); //~ ERROR mismatched types
6
7     let _v: &str = "foo".to_string(); //~ ERROR mismatched types
8 }
9
10 fn test2() {
11     let mut path: String = "/usr".to_string();
12     let folder: String = "lib".to_string();
13
14     path = format!("{}/{}", path, folder).as_str(); //~ ERROR mismatched types
15
16     println!("{}", &path);
17 }
18
19 fn main() {
20     test1();
21     test2();
22 }