forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#64192 - estebank:turbofish-madness, r=petro…
…chenkov Bail out when encountering likely missing turbofish in parser When encountering a likely intended turbofish without `::`, bubble up the diagnostic instead of emitting it to allow the parser to recover more gracefully and avoid uneccessary type errors that are likely to be wrong. Fix rust-lang#61329.
- Loading branch information
Showing
9 changed files
with
37 additions
and
138 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
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,27 +1,16 @@ | ||
fn foo() { | ||
(0..13).collect<Vec<i32>>(); | ||
//~^ ERROR chained comparison | ||
//~| ERROR expected value, found struct `Vec` | ||
//~| ERROR expected value, found builtin type `i32` | ||
//~| ERROR attempted to take value of method `collect` | ||
} | ||
|
||
fn bar() { | ||
Vec<i32>::new(); | ||
//~^ ERROR chained comparison | ||
//~| ERROR expected value, found struct `Vec` | ||
//~| ERROR expected value, found builtin type `i32` | ||
//~| ERROR cannot find function `new` in the crate root | ||
} | ||
|
||
fn qux() { | ||
(0..13).collect<Vec<i32>(); | ||
//~^ ERROR chained comparison | ||
//~| ERROR chained comparison | ||
//~| ERROR expected value, found struct `Vec` | ||
//~| ERROR expected value, found builtin type `i32` | ||
//~| ERROR attempted to take value of method `collect` | ||
//~| ERROR mismatched types | ||
} | ||
|
||
fn main() {} |
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
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