Skip to content

Commit d27683a

Browse files
committed
Prove bad turbofish parser recovery in test
1 parent d7dceaa commit d27683a

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1-
fn foo() {
1+
fn main() {
22
(0..13).collect<Vec<i32>>();
33
//~^ ERROR chained comparison
4-
}
5-
6-
fn bar() {
74
Vec<i32>::new();
85
//~^ ERROR chained comparison
9-
}
10-
11-
fn qux() {
126
(0..13).collect<Vec<i32>();
137
//~^ ERROR chained comparison
148
}
15-
16-
fn main() {}

src/test/ui/did_you_mean/issue-40396.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | (0..13).collect::<Vec<i32>>();
99
| ^^
1010

1111
error: chained comparison operators require parentheses
12-
--> $DIR/issue-40396.rs:7:8
12+
--> $DIR/issue-40396.rs:4:8
1313
|
1414
LL | Vec<i32>::new();
1515
| ^^^^^
@@ -19,7 +19,7 @@ LL | Vec::<i32>::new();
1919
| ^^
2020

2121
error: chained comparison operators require parentheses
22-
--> $DIR/issue-40396.rs:12:20
22+
--> $DIR/issue-40396.rs:6:20
2323
|
2424
LL | (0..13).collect<Vec<i32>();
2525
| ^^^^^

0 commit comments

Comments
 (0)