From 2de4932453a99a19e9033edb47db7a66a612188c Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 7 Mar 2016 21:17:31 -0500 Subject: [PATCH] update error messages in parse-fail tests --- src/test/parse-fail/issue-19096.rs | 2 +- src/test/parse-fail/issue-3036.rs | 2 +- src/test/parse-fail/macros-no-semicolon.rs | 2 +- src/test/parse-fail/match-refactor-to-expr.rs | 2 +- src/test/parse-fail/range-3.rs | 2 +- src/test/parse-fail/range-4.rs | 2 +- src/test/parse-fail/raw-str-unbalanced.rs | 2 +- src/test/parse-fail/removed-syntax-mut-vec-expr.rs | 2 +- src/test/parse-fail/removed-syntax-uniq-mut-expr.rs | 2 +- src/test/parse-fail/removed-syntax-with-1.rs | 2 +- src/test/parse-fail/struct-literal-in-for.rs | 2 +- src/test/parse-fail/struct-literal-in-if.rs | 2 +- src/test/parse-fail/struct-literal-in-match-discriminant.rs | 2 +- src/test/parse-fail/struct-literal-in-while.rs | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/test/parse-fail/issue-19096.rs b/src/test/parse-fail/issue-19096.rs index 0d9a111045a..6ba0fb5f15b 100644 --- a/src/test/parse-fail/issue-19096.rs +++ b/src/test/parse-fail/issue-19096.rs @@ -12,5 +12,5 @@ fn main() { let t = (42, 42); - t.0::; //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `::` + t.0::; //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `::` } diff --git a/src/test/parse-fail/issue-3036.rs b/src/test/parse-fail/issue-3036.rs index 1946e984e5d..229b12136fc 100644 --- a/src/test/parse-fail/issue-3036.rs +++ b/src/test/parse-fail/issue-3036.rs @@ -15,4 +15,4 @@ fn main() { let x = 3 -} //~ ERROR: expected one of `.`, `;`, or an operator, found `}` +} //~ ERROR: expected one of `.`, `;`, `?`, or an operator, found `}` diff --git a/src/test/parse-fail/macros-no-semicolon.rs b/src/test/parse-fail/macros-no-semicolon.rs index 5931631ccee..1c55d70f607 100644 --- a/src/test/parse-fail/macros-no-semicolon.rs +++ b/src/test/parse-fail/macros-no-semicolon.rs @@ -12,6 +12,6 @@ fn main() { assert_eq!(1, 2) - assert_eq!(3, 4) //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `assert_eq` + assert_eq!(3, 4) //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `assert_eq` println!("hello"); } diff --git a/src/test/parse-fail/match-refactor-to-expr.rs b/src/test/parse-fail/match-refactor-to-expr.rs index b99d0493ff7..37b66601e70 100644 --- a/src/test/parse-fail/match-refactor-to-expr.rs +++ b/src/test/parse-fail/match-refactor-to-expr.rs @@ -14,7 +14,7 @@ fn main() { let foo = match //~ NOTE did you mean to remove this `match` keyword? Some(4).unwrap_or_else(5) - ; //~ ERROR expected one of `.`, `{`, or an operator, found `;` + ; //~ ERROR expected one of `.`, `?`, `{`, or an operator, found `;` println!("{}", foo) } diff --git a/src/test/parse-fail/range-3.rs b/src/test/parse-fail/range-3.rs index 284cdb8c653..95aa71b0cdf 100644 --- a/src/test/parse-fail/range-3.rs +++ b/src/test/parse-fail/range-3.rs @@ -14,5 +14,5 @@ pub fn main() { let r = 1..2..3; - //~^ ERROR expected one of `.`, `;`, or an operator, found `..` + //~^ ERROR expected one of `.`, `;`, `?`, or an operator, found `..` } diff --git a/src/test/parse-fail/range-4.rs b/src/test/parse-fail/range-4.rs index 69898612771..4500df116a2 100644 --- a/src/test/parse-fail/range-4.rs +++ b/src/test/parse-fail/range-4.rs @@ -14,5 +14,5 @@ pub fn main() { let r = ..1..2; - //~^ ERROR expected one of `.`, `;`, or an operator, found `..` + //~^ ERROR expected one of `.`, `;`, `?`, or an operator, found `..` } diff --git a/src/test/parse-fail/raw-str-unbalanced.rs b/src/test/parse-fail/raw-str-unbalanced.rs index ce8960edde1..5c09f68970b 100644 --- a/src/test/parse-fail/raw-str-unbalanced.rs +++ b/src/test/parse-fail/raw-str-unbalanced.rs @@ -12,5 +12,5 @@ static s: &'static str = r#" - "## //~ ERROR expected one of `.`, `;`, or an operator, found `#` + "## //~ ERROR expected one of `.`, `;`, `?`, or an operator, found `#` ; diff --git a/src/test/parse-fail/removed-syntax-mut-vec-expr.rs b/src/test/parse-fail/removed-syntax-mut-vec-expr.rs index ab9ff7ac19e..301bd0e8b1c 100644 --- a/src/test/parse-fail/removed-syntax-mut-vec-expr.rs +++ b/src/test/parse-fail/removed-syntax-mut-vec-expr.rs @@ -13,5 +13,5 @@ fn f() { let v = [mut 1, 2, 3, 4]; //~^ ERROR expected identifier, found keyword `mut` - //~^^ ERROR expected one of `!`, `,`, `.`, `::`, `;`, `]`, `{`, or an operator, found `1` + //~^^ ERROR expected one of `!`, `,`, `.`, `::`, `;`, `?`, `]`, `{`, or an operator, found `1` } diff --git a/src/test/parse-fail/removed-syntax-uniq-mut-expr.rs b/src/test/parse-fail/removed-syntax-uniq-mut-expr.rs index ea686aeb6e0..2f637cf0b4e 100644 --- a/src/test/parse-fail/removed-syntax-uniq-mut-expr.rs +++ b/src/test/parse-fail/removed-syntax-uniq-mut-expr.rs @@ -13,5 +13,5 @@ fn f() { let a_box = box mut 42; //~^ ERROR expected identifier, found keyword `mut` - //~^^ ERROR expected one of `!`, `.`, `::`, `;`, `{`, or an operator, found `42` + //~^^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `42` } diff --git a/src/test/parse-fail/removed-syntax-with-1.rs b/src/test/parse-fail/removed-syntax-with-1.rs index e9de52c013b..156b172a944 100644 --- a/src/test/parse-fail/removed-syntax-with-1.rs +++ b/src/test/parse-fail/removed-syntax-with-1.rs @@ -18,5 +18,5 @@ fn removed_with() { let a = S { foo: (), bar: () }; let b = S { foo: () with a }; - //~^ ERROR expected one of `,`, `.`, `}`, or an operator, found `with` + //~^ ERROR expected one of `,`, `.`, `?`, `}`, or an operator, found `with` } diff --git a/src/test/parse-fail/struct-literal-in-for.rs b/src/test/parse-fail/struct-literal-in-for.rs index e57298f7280..93098455560 100644 --- a/src/test/parse-fail/struct-literal-in-for.rs +++ b/src/test/parse-fail/struct-literal-in-for.rs @@ -23,7 +23,7 @@ impl Foo { fn main() { for x in Foo { x: 3 //~ ERROR expected type, found `3` - }.hi() { //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `{` + }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{` println!("yo"); } } diff --git a/src/test/parse-fail/struct-literal-in-if.rs b/src/test/parse-fail/struct-literal-in-if.rs index 6bf41b7a450..db6a360a567 100644 --- a/src/test/parse-fail/struct-literal-in-if.rs +++ b/src/test/parse-fail/struct-literal-in-if.rs @@ -23,7 +23,7 @@ impl Foo { fn main() { if Foo { x: 3 //~ ERROR expected type, found `3` - }.hi() { //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `{` + }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{` println!("yo"); } } diff --git a/src/test/parse-fail/struct-literal-in-match-discriminant.rs b/src/test/parse-fail/struct-literal-in-match-discriminant.rs index 679f4542824..7038cc798c4 100644 --- a/src/test/parse-fail/struct-literal-in-match-discriminant.rs +++ b/src/test/parse-fail/struct-literal-in-match-discriminant.rs @@ -20,6 +20,6 @@ fn main() { } { Foo { x: x - } => {} //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `=>` + } => {} //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `=>` } } diff --git a/src/test/parse-fail/struct-literal-in-while.rs b/src/test/parse-fail/struct-literal-in-while.rs index b388aac2c54..75e4eb3de07 100644 --- a/src/test/parse-fail/struct-literal-in-while.rs +++ b/src/test/parse-fail/struct-literal-in-while.rs @@ -23,7 +23,7 @@ impl Foo { fn main() { while Foo { x: 3 //~ ERROR expected type, found `3` - }.hi() { //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `{` + }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{` println!("yo"); } }