Skip to content

Commit 2de4932

Browse files
author
Jorge Aparicio
committed
update error messages in parse-fail tests
1 parent 210dd61 commit 2de4932

14 files changed

+14
-14
lines changed

Diff for: src/test/parse-fail/issue-19096.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
fn main() {
1414
let t = (42, 42);
15-
t.0::<isize>; //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `::`
15+
t.0::<isize>; //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `::`
1616
}

Diff for: src/test/parse-fail/issue-3036.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
fn main()
1616
{
1717
let x = 3
18-
} //~ ERROR: expected one of `.`, `;`, or an operator, found `}`
18+
} //~ ERROR: expected one of `.`, `;`, `?`, or an operator, found `}`

Diff for: src/test/parse-fail/macros-no-semicolon.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212

1313
fn main() {
1414
assert_eq!(1, 2)
15-
assert_eq!(3, 4) //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `assert_eq`
15+
assert_eq!(3, 4) //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `assert_eq`
1616
println!("hello");
1717
}

Diff for: src/test/parse-fail/match-refactor-to-expr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn main() {
1414
let foo =
1515
match //~ NOTE did you mean to remove this `match` keyword?
1616
Some(4).unwrap_or_else(5)
17-
; //~ ERROR expected one of `.`, `{`, or an operator, found `;`
17+
; //~ ERROR expected one of `.`, `?`, `{`, or an operator, found `;`
1818

1919
println!("{}", foo)
2020
}

Diff for: src/test/parse-fail/range-3.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414

1515
pub fn main() {
1616
let r = 1..2..3;
17-
//~^ ERROR expected one of `.`, `;`, or an operator, found `..`
17+
//~^ ERROR expected one of `.`, `;`, `?`, or an operator, found `..`
1818
}

Diff for: src/test/parse-fail/range-4.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414

1515
pub fn main() {
1616
let r = ..1..2;
17-
//~^ ERROR expected one of `.`, `;`, or an operator, found `..`
17+
//~^ ERROR expected one of `.`, `;`, `?`, or an operator, found `..`
1818
}

Diff for: src/test/parse-fail/raw-str-unbalanced.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
static s: &'static str =
1414
r#"
15-
"## //~ ERROR expected one of `.`, `;`, or an operator, found `#`
15+
"## //~ ERROR expected one of `.`, `;`, `?`, or an operator, found `#`
1616
;

Diff for: src/test/parse-fail/removed-syntax-mut-vec-expr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
fn f() {
1414
let v = [mut 1, 2, 3, 4];
1515
//~^ ERROR expected identifier, found keyword `mut`
16-
//~^^ ERROR expected one of `!`, `,`, `.`, `::`, `;`, `]`, `{`, or an operator, found `1`
16+
//~^^ ERROR expected one of `!`, `,`, `.`, `::`, `;`, `?`, `]`, `{`, or an operator, found `1`
1717
}

Diff for: src/test/parse-fail/removed-syntax-uniq-mut-expr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
fn f() {
1414
let a_box = box mut 42;
1515
//~^ ERROR expected identifier, found keyword `mut`
16-
//~^^ ERROR expected one of `!`, `.`, `::`, `;`, `{`, or an operator, found `42`
16+
//~^^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `42`
1717
}

Diff for: src/test/parse-fail/removed-syntax-with-1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ fn removed_with() {
1818

1919
let a = S { foo: (), bar: () };
2020
let b = S { foo: () with a };
21-
//~^ ERROR expected one of `,`, `.`, `}`, or an operator, found `with`
21+
//~^ ERROR expected one of `,`, `.`, `?`, `}`, or an operator, found `with`
2222
}

Diff for: src/test/parse-fail/struct-literal-in-for.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl Foo {
2323
fn main() {
2424
for x in Foo {
2525
x: 3 //~ ERROR expected type, found `3`
26-
}.hi() { //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `{`
26+
}.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
2727
println!("yo");
2828
}
2929
}

Diff for: src/test/parse-fail/struct-literal-in-if.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl Foo {
2323
fn main() {
2424
if Foo {
2525
x: 3 //~ ERROR expected type, found `3`
26-
}.hi() { //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `{`
26+
}.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
2727
println!("yo");
2828
}
2929
}

Diff for: src/test/parse-fail/struct-literal-in-match-discriminant.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ fn main() {
2020
} {
2121
Foo {
2222
x: x
23-
} => {} //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `=>`
23+
} => {} //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `=>`
2424
}
2525
}

Diff for: src/test/parse-fail/struct-literal-in-while.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl Foo {
2323
fn main() {
2424
while Foo {
2525
x: 3 //~ ERROR expected type, found `3`
26-
}.hi() { //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `{`
26+
}.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
2727
println!("yo");
2828
}
2929
}

0 commit comments

Comments
 (0)