Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect turbofish with multiple type params missing leading
::
Fix #76072.
- Loading branch information
Showing
4 changed files
with
167 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,29 @@ | ||
fn main() { | ||
(0..13).collect<Vec<i32>>(); | ||
//~^ ERROR comparison operators cannot be chained | ||
//~| HELP use `::<...>` instead | ||
Vec<i32>::new(); | ||
//~^ ERROR comparison operators cannot be chained | ||
//~| HELP use `::<...>` instead | ||
(0..13).collect<Vec<i32>(); | ||
//~^ ERROR comparison operators cannot be chained | ||
//~| HELP use `::<...>` instead | ||
let x = std::collections::HashMap<i128, i128>::new(); //~ ERROR expected one of | ||
//~^ HELP use `::<...>` instead | ||
let x: () = 42; //~ ERROR mismatched types | ||
let x = { | ||
std::collections::HashMap<i128, i128>::new() //~ ERROR expected one of | ||
//~^ HELP use `::<...>` instead | ||
}; | ||
let x: () = 42; //~ ERROR mismatched types | ||
let x = { | ||
std::collections::HashMap<i128, i128>::new(); //~ ERROR expected one of | ||
//~^ HELP use `::<...>` instead | ||
let x: () = 42; //~ ERROR mismatched types | ||
}; | ||
{ | ||
std::collections::HashMap<i128, i128>::new(1, 2); //~ ERROR expected one of | ||
//~^ HELP use `::<...>` instead | ||
let x: () = 32; //~ ERROR mismatched types | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters