]> git.proxmox.com Git - rustc.git/blob - src/test/ui/did_you_mean/issue-40396.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / did_you_mean / issue-40396.rs
1 fn main() {
2 (0..13).collect<Vec<i32>>();
3 //~^ ERROR comparison operators cannot be chained
4 //~| HELP use `::<...>` instead
5 Vec<i32>::new();
6 //~^ ERROR comparison operators cannot be chained
7 //~| HELP use `::<...>` instead
8 (0..13).collect<Vec<i32>();
9 //~^ ERROR comparison operators cannot be chained
10 //~| HELP use `::<...>` instead
11 let x = std::collections::HashMap<i128, i128>::new(); //~ ERROR expected one of
12 //~^ HELP use `::<...>` instead
13 let x: () = 42; //~ ERROR mismatched types
14 let x = {
15 std::collections::HashMap<i128, i128>::new() //~ ERROR expected one of
16 //~^ HELP use `::<...>` instead
17 };
18 let x: () = 42; //~ ERROR mismatched types
19 let x = {
20 std::collections::HashMap<i128, i128>::new(); //~ ERROR expected one of
21 //~^ HELP use `::<...>` instead
22 let x: () = 42; //~ ERROR mismatched types
23 };
24 {
25 std::collections::HashMap<i128, i128>::new(1, 2); //~ ERROR expected one of
26 //~^ HELP use `::<...>` instead
27 let x: () = 32; //~ ERROR mismatched types
28 };
29 }