1
Fork 0

Prove bad turbofish parser recovery in test

This commit is contained in:
Esteban Küber 2019-09-30 13:22:58 -07:00
parent d7dceaa0c5
commit d27683a39f
2 changed files with 3 additions and 11 deletions

View file

@ -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() {}

View file

@ -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>();
| ^^^^^