update error messages in parse-fail tests
This commit is contained in:
parent
210dd611aa
commit
2de4932453
@ -12,5 +12,5 @@
|
||||
|
||||
fn main() {
|
||||
let t = (42, 42);
|
||||
t.0::<isize>; //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `::`
|
||||
t.0::<isize>; //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `::`
|
||||
}
|
||||
|
@ -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 `}`
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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 `..`
|
||||
}
|
||||
|
@ -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 `..`
|
||||
}
|
||||
|
@ -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 `#`
|
||||
;
|
||||
|
@ -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`
|
||||
}
|
||||
|
@ -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`
|
||||
}
|
||||
|
@ -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`
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
@ -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 `=>`
|
||||
}
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user