Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
camsteffen committed Aug 31, 2021
1 parent 5b95df4 commit 3ff1d6b
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions src/test/ui/did_you_mean/issue-40396.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ help: use `::<...>` instead of `<...>` to specify type or const arguments
LL | (0..13).collect::<Vec<i32>();
| ++

error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `,`
error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,`
--> $DIR/issue-40396.rs:11:43
|
LL | let x = std::collections::HashMap<i128, i128>::new();
| ^ expected one of 7 possible tokens
| ^ expected one of 8 possible tokens
|
help: use `::<...>` instead of `<...>` to specify type or const arguments
|
Expand Down
16 changes: 8 additions & 8 deletions src/test/ui/parser/attr-stmt-expr-attr-bad.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ error: expected expression, found `]`
LL | #[cfg(FALSE)] fn e() { let _ = [#[attr]]; }
| ^ expected expression

error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `#`
error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `#`
--> $DIR/attr-stmt-expr-attr-bad.rs:9:35
|
LL | #[cfg(FALSE)] fn e() { let _ = foo#[attr](); }
| ^ expected one of 7 possible tokens
| ^ expected one of 8 possible tokens

error: an inner attribute is not permitted in this context
--> $DIR/attr-stmt-expr-attr-bad.rs:11:36
Expand Down Expand Up @@ -70,11 +70,11 @@ LL | #[cfg(FALSE)] fn e() { let _ = -#![attr] 0; }
|
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.

error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `#`
error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `#`
--> $DIR/attr-stmt-expr-attr-bad.rs:23:34
|
LL | #[cfg(FALSE)] fn e() { let _ = x #![attr] as Y; }
| ^ expected one of 7 possible tokens
| ^ expected one of 8 possible tokens

error: an inner attribute is not permitted in this context
--> $DIR/attr-stmt-expr-attr-bad.rs:25:35
Expand Down Expand Up @@ -372,23 +372,23 @@ error: unexpected token: `#`
LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); }
| ^

error: expected one of `.`, `;`, `?`, or an operator, found `#`
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
--> $DIR/attr-stmt-expr-attr-bad.rs:100:34
|
LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); }
| ^ expected one of `.`, `;`, `?`, or an operator
| ^ expected one of `.`, `;`, `?`, `else`, or an operator

error: unexpected token: `#`
--> $DIR/attr-stmt-expr-attr-bad.rs:103:34
|
LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); }
| ^

error: expected one of `.`, `;`, `?`, or an operator, found `#`
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
--> $DIR/attr-stmt-expr-attr-bad.rs:103:34
|
LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); }
| ^ expected one of `.`, `;`, `?`, or an operator
| ^ expected one of `.`, `;`, `?`, `else`, or an operator

error: expected statement after outer attribute
--> $DIR/attr-stmt-expr-attr-bad.rs:108:37
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/parser/issue-72253.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fn main() {
let a = std::process::Command::new("echo")
.arg("1")
,arg("2") //~ ERROR expected one of `.`, `;`, `?`, or an operator, found `,`
,arg("2") //~ ERROR expected one of `.`, `;`, `?`, `else`, or an operator, found `,`
.output();
}
4 changes: 2 additions & 2 deletions src/test/ui/parser/issue-72253.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: expected one of `.`, `;`, `?`, or an operator, found `,`
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `,`
--> $DIR/issue-72253.rs:4:9
|
LL | .arg("1")
| - expected one of `.`, `;`, `?`, or an operator
| - expected one of `.`, `;`, `?`, `else`, or an operator
LL | ,arg("2")
| ^ unexpected token

Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/parser/issue-84117.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ fn main() {
let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
//~^ ERROR expected one of `>`, a const expression
//~| ERROR expected one of `>`, a const expression, lifetime, or type, found `}`
//~| ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `,`
//~| ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `,`
//~| ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `,`
//~| ERROR expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,`
//~| ERROR expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,`
//~| ERROR expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,`
}
//~^ ERROR expected one of `,`, `:`, `=`, or `>`, found `}`
12 changes: 6 additions & 6 deletions src/test/ui/parser/issue-84117.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
| | help: use `=` if you meant to assign
| while parsing the type for `inner_local`

error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `,`
error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,`
--> $DIR/issue-84117.rs:2:65
|
LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
| ^ expected one of 7 possible tokens
| ^ expected one of 8 possible tokens

error: expected one of `,`, `:`, `=`, or `>`, found `}`
--> $DIR/issue-84117.rs:8:1
Expand All @@ -33,17 +33,17 @@ LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
| | help: use `=` if you meant to assign
| while parsing the type for `inner_local`

error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `,`
error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,`
--> $DIR/issue-84117.rs:2:65
|
LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
| ^ expected one of 7 possible tokens
| ^ expected one of 8 possible tokens

error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `,`
error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,`
--> $DIR/issue-84117.rs:2:33
|
LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
| ^ expected one of 7 possible tokens
| ^ expected one of 8 possible tokens

error: aborting due to 6 previous errors

4 changes: 2 additions & 2 deletions src/test/ui/parser/macro/issue-37234.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: expected one of `.`, `;`, `?`, or an operator, found `""`
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `""`
--> $DIR/issue-37234.rs:3:19
|
LL | let x = 5 "";
| ^^ expected one of `.`, `;`, `?`, or an operator
| ^^ expected one of `.`, `;`, `?`, `else`, or an operator
...
LL | failed!();
| ---------- in this macro invocation
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/parser/missing-semicolon.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
macro_rules! m {
($($e1:expr),*; $($e2:expr),*) => {
$( let x = $e1 )*; //~ ERROR expected one of `.`, `;`, `?`, or
$( let x = $e1 )*; //~ ERROR expected one of `.`, `;`, `?`, `else`, or
$( println!("{}", $e2) )*;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/parser/missing-semicolon.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: expected one of `.`, `;`, `?`, or an operator, found keyword `let`
error: expected one of `.`, `;`, `?`, `else`, or an operator, found keyword `let`
--> $DIR/missing-semicolon.rs:3:12
|
LL | $( let x = $e1 )*;
| ^^^ expected one of `.`, `;`, `?`, or an operator
| ^^^ expected one of `.`, `;`, `?`, `else`, or an operator
...
LL | fn main() { m!(0, 0; 0, 0); }
| --------------- in this macro invocation
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/parser/range-3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

pub fn main() {
let r = 1..2..3;
//~^ ERROR expected one of `.`, `;`, `?`, or an operator, found `..`
//~^ ERROR expected one of `.`, `;`, `?`, `else`, or an operator, found `..`
}
4 changes: 2 additions & 2 deletions src/test/ui/parser/range-3.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: expected one of `.`, `;`, `?`, or an operator, found `..`
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `..`
--> $DIR/range-3.rs:4:17
|
LL | let r = 1..2..3;
| ^^ expected one of `.`, `;`, `?`, or an operator
| ^^ expected one of `.`, `;`, `?`, `else`, or an operator

error: aborting due to previous error

2 changes: 1 addition & 1 deletion src/test/ui/parser/range-4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

pub fn main() {
let r = ..1..2;
//~^ ERROR expected one of `.`, `;`, `?`, or an operator, found `..`
//~^ ERROR expected one of `.`, `;`, `?`, `else`, or an operator, found `..`
}
4 changes: 2 additions & 2 deletions src/test/ui/parser/range-4.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: expected one of `.`, `;`, `?`, or an operator, found `..`
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `..`
--> $DIR/range-4.rs:4:16
|
LL | let r = ..1..2;
| ^^ expected one of `.`, `;`, `?`, or an operator
| ^^ expected one of `.`, `;`, `?`, `else`, or an operator

error: aborting due to previous error

0 comments on commit 3ff1d6b

Please sign in to comment.