mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-07 04:38:46 +00:00
update error messages in parse-fail tests
This commit is contained in:
parent
210dd611aa
commit
2de4932453
@ -12,5 +12,5 @@
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let t = (42, 42);
|
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()
|
fn main()
|
||||||
{
|
{
|
||||||
let x = 3
|
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() {
|
fn main() {
|
||||||
assert_eq!(1, 2)
|
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");
|
println!("hello");
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ fn main() {
|
|||||||
let foo =
|
let foo =
|
||||||
match //~ NOTE did you mean to remove this `match` keyword?
|
match //~ NOTE did you mean to remove this `match` keyword?
|
||||||
Some(4).unwrap_or_else(5)
|
Some(4).unwrap_or_else(5)
|
||||||
; //~ ERROR expected one of `.`, `{`, or an operator, found `;`
|
; //~ ERROR expected one of `.`, `?`, `{`, or an operator, found `;`
|
||||||
|
|
||||||
println!("{}", foo)
|
println!("{}", foo)
|
||||||
}
|
}
|
||||||
|
@ -14,5 +14,5 @@
|
|||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
let r = 1..2..3;
|
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() {
|
pub fn main() {
|
||||||
let r = ..1..2;
|
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 =
|
static s: &'static str =
|
||||||
r#"
|
r#"
|
||||||
"## //~ ERROR expected one of `.`, `;`, or an operator, found `#`
|
"## //~ ERROR expected one of `.`, `;`, `?`, or an operator, found `#`
|
||||||
;
|
;
|
||||||
|
@ -13,5 +13,5 @@
|
|||||||
fn f() {
|
fn f() {
|
||||||
let v = [mut 1, 2, 3, 4];
|
let v = [mut 1, 2, 3, 4];
|
||||||
//~^ ERROR expected identifier, found keyword `mut`
|
//~^ 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() {
|
fn f() {
|
||||||
let a_box = box mut 42;
|
let a_box = box mut 42;
|
||||||
//~^ ERROR expected identifier, found keyword `mut`
|
//~^ 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 a = S { foo: (), bar: () };
|
||||||
let b = S { foo: () with a };
|
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() {
|
fn main() {
|
||||||
for x in Foo {
|
for x in Foo {
|
||||||
x: 3 //~ ERROR expected type, found `3`
|
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");
|
println!("yo");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ impl Foo {
|
|||||||
fn main() {
|
fn main() {
|
||||||
if Foo {
|
if Foo {
|
||||||
x: 3 //~ ERROR expected type, found `3`
|
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");
|
println!("yo");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,6 @@ fn main() {
|
|||||||
} {
|
} {
|
||||||
Foo {
|
Foo {
|
||||||
x: x
|
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() {
|
fn main() {
|
||||||
while Foo {
|
while Foo {
|
||||||
x: 3 //~ ERROR expected type, found `3`
|
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");
|
println!("yo");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user