]> git.lizzy.rs Git - rust.git/blob - tests/ui/did_you_mean/issue-40396.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / 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 }