Skip to content
Permalink
Browse files

Prove bad turbofish parser recovery in test

  • Loading branch information...
estebank committed Sep 30, 2019
1 parent d7dceaa commit d27683a39f5924205d73e0015b8c25c97aadaa63
Showing with 3 additions and 11 deletions.
  1. +1 −9 src/test/ui/did_you_mean/issue-40396.rs
  2. +2 −2 src/test/ui/did_you_mean/issue-40396.stderr
@@ -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>();
| ^^^^^

0 comments on commit d27683a

Please sign in to comment.
You can’t perform that action at this time.