mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-26 14:43:24 +00:00
Fix tests
This commit is contained in:
parent
5b95df4bdc
commit
3ff1d6bbf4
@ -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
|
||||
|
|
||||
|
@ -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
|
||||
@ -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
|
||||
@ -372,11 +372,11 @@ 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
|
||||
@ -384,11 +384,11 @@ 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: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
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 `}`
|
||||
|
@ -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
|
||||
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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) )*;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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 `..`
|
||||
}
|
||||
|
@ -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,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 `..`
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user