Prove bad turbofish parser recovery in test
This commit is contained in:
parent
d7dceaa0c5
commit
d27683a39f
2 changed files with 3 additions and 11 deletions
|
@ -1,16 +1,8 @@
|
|||
fn foo() {
|
||||
fn main() {
|
||||
(0..13).collect<Vec<i32>>();
|
||||
//~^ ERROR chained comparison
|
||||
}
|
||||
|
||||
fn bar() {
|
||||
Vec<i32>::new();
|
||||
//~^ ERROR chained comparison
|
||||
}
|
||||
|
||||
fn qux() {
|
||||
(0..13).collect<Vec<i32>();
|
||||
//~^ ERROR chained comparison
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -9,7 +9,7 @@ LL | (0..13).collect::<Vec<i32>>();
|
|||
| ^^
|
||||
|
||||
error: chained comparison operators require parentheses
|
||||
--> $DIR/issue-40396.rs:7:8
|
||||
--> $DIR/issue-40396.rs:4:8
|
||||
|
|
||||
LL | Vec<i32>::new();
|
||||
| ^^^^^
|
||||
|
@ -19,7 +19,7 @@ LL | Vec::<i32>::new();
|
|||
| ^^
|
||||
|
||||
error: chained comparison operators require parentheses
|
||||
--> $DIR/issue-40396.rs:12:20
|
||||
--> $DIR/issue-40396.rs:6:20
|
||||
|
|
||||
LL | (0..13).collect<Vec<i32>();
|
||||
| ^^^^^
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue