};
(format!("expected one of {}, found {}", expect, actual),
(self.sess.source_map().next_point(self.prev_span),
- format!("expected one of {} here", short_expect)))
+ format!("expected one of {}", short_expect)))
} else if expected.is_empty() {
(format!("unexpected token: {}", actual),
(self.prev_span, "unexpected token after this".to_string()))
--> $DIR/anon-params-denied-2018.rs:6:15
|
LL | fn foo(i32);
- | ^ expected one of `:`, `@`, or `|` here
+ | ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this is a `self` type, give it a parameter name
--> $DIR/anon-params-denied-2018.rs:8:36
|
LL | fn bar_with_default_impl(String, String) {}
- | ^ expected one of `:`, `@`, or `|` here
+ | ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this is a `self` type, give it a parameter name
--> $DIR/anon-params-denied-2018.rs:8:44
|
LL | fn bar_with_default_impl(String, String) {}
- | ^ expected one of `:`, `@`, or `|` here
+ | ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this was a parameter name, give it a type
--> $DIR/anon-params-denied-2018.rs:13:22
|
LL | fn baz(a:usize, b, c: usize) -> usize {
- | ^ expected one of `:`, `@`, or `|` here
+ | ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this was a parameter name, give it a type
--> $DIR/incorrect-syntax-suggestions.rs:134:1
|
LL | match await { await => () }
- | ----- - expected one of `.`, `?`, `{`, or an operator here
+ | ----- - expected one of `.`, `?`, `{`, or an operator
| |
| while parsing this match expression
...
--> $DIR/no-async-const.rs:5:11
|
LL | pub async const fn x() {}
- | ^^^^^ expected one of `fn` or `unsafe` here
+ | ^^^^^ expected one of `fn` or `unsafe`
error: aborting due to previous error
--> $DIR/no-unsafe-async.rs:7:12
|
LL | unsafe async fn g() {}
- | ^^^^^ expected one of `extern` or `fn` here
+ | ^^^^^ expected one of `extern` or `fn`
error: expected one of `extern`, `fn`, or `{`, found keyword `async`
--> $DIR/no-unsafe-async.rs:11:8
|
LL | unsafe async fn f() {}
- | ^^^^^ expected one of `extern`, `fn`, or `{` here
+ | ^^^^^ expected one of `extern`, `fn`, or `{`
error: aborting due to 2 previous errors
--> $DIR/can-begin-expr-check.rs:19:12
|
LL | return enum;
- | ^^^^ expected one of `.`, `;`, `?`, `}`, or an operator here
+ | ^^^^ expected one of `.`, `;`, `?`, `}`, or an operator
error: aborting due to previous error
--> $DIR/bad-format-args.rs:4:19
|
LL | format!("", 1 1);
- | ^ expected one of `,`, `.`, `?`, or an operator here
+ | ^ expected one of `,`, `.`, `?`, or an operator
error: aborting due to 3 previous errors
--> $DIR/const-expression-parameter.rs:13:22
|
LL | i32_identity::<1 + 2>();
- | ^ expected one of `,` or `>` here
+ | ^ expected one of `,` or `>`
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
--> $DIR/const-expression-parameter.rs:1:12
--> $DIR/issue-40006.rs:28:9
|
LL | ::Y ();
- | ^ expected one of `!` or `::` here
+ | ^ expected one of `!` or `::`
error: missing `fn`, `type`, or `const` for impl-item declaration
--> $DIR/issue-40006.rs:32:8
LL | if (a and b) {
| ^^^
| |
- | expected one of 8 possible tokens here
+ | expected one of 8 possible tokens
| help: use `&&` instead of `and` for the boolean operator
error: expected one of `!`, `)`, `,`, `.`, `::`, `?`, `{`, or an operator, found `or`
LL | if (a or b) {
| ^^
| |
- | expected one of 8 possible tokens here
+ | expected one of 8 possible tokens
| help: use `||` instead of `or` for the boolean operator
error: expected one of `!`, `.`, `::`, `?`, `{`, or an operator, found `and`
LL | while a and b {
| ^^^
| |
- | expected one of `!`, `.`, `::`, `?`, `{`, or an operator here
+ | expected one of `!`, `.`, `::`, `?`, `{`, or an operator
| help: use `&&` instead of `and` for the boolean operator
error: expected one of `!`, `.`, `::`, `?`, `{`, or an operator, found `or`
LL | while a or b {
| ^^
| |
- | expected one of `!`, `.`, `::`, `?`, `{`, or an operator here
+ | expected one of `!`, `.`, `::`, `?`, `{`, or an operator
| help: use `||` instead of `or` for the boolean operator
error: aborting due to 6 previous errors
--> <::edition_kw_macro_2015::passes_ident macros>:1:22
|
LL | ($ i : ident) => ($ i)
- | ^ expected one of `move`, `|`, or `||` here
+ | ^ expected one of `move`, `|`, or `||`
|
::: $DIR/edition-keywords-2018-2015-parsing.rs:16:8
|
--> <::edition_kw_macro_2018::passes_ident macros>:1:22
|
LL | ($ i : ident) => ($ i)
- | ^ expected one of `move`, `|`, or `||` here
+ | ^ expected one of `move`, `|`, or `||`
|
::: $DIR/edition-keywords-2018-2018-parsing.rs:16:8
|
--> $DIR/feature-gate-extern_prelude.rs:1:4
|
LL | can-only-test-this-in-run-make-fulldeps
- | ^ expected one of `!` or `::` here
+ | ^ expected one of `!` or `::`
error: aborting due to previous error
--> $DIR/import-prefix-macro-1.rs:11:27
|
LL | ($p: path) => (use $p {S, Z});
- | ^^^^^^ expected one of `::`, `;`, or `as` here
+ | ^^^^^^ expected one of `::`, `;`, or `as`
...
LL | import! { a::b::c }
| ------------------- in this macro invocation
--> $DIR/invalid-variadic-function.rs:1:30
|
LL | extern "C" fn foo(x: u8, ...);
- | ^ expected one of `->`, `where`, or `{` here
+ | ^ expected one of `->`, `where`, or `{`
error: aborting due to 2 previous errors
--> $DIR/issue-20616-1.rs:9:16
|
LL | type Type_1<'a T> = &'a T;
- | ^ expected one of `,`, `:`, or `>` here
+ | ^ expected one of `,`, `:`, or `>`
error: aborting due to previous error
--> $DIR/issue-20616-2.rs:12:31
|
LL | type Type_2 = Type_1_<'static ()>;
- | ^ expected one of `,` or `>` here
+ | ^ expected one of `,` or `>`
error: aborting due to previous error
--> $DIR/issue-20616-3.rs:13:24
|
LL | type Type_3<T> = Box<T,,>;
- | ^ expected one of `>`, const, identifier, lifetime, or type here
+ | ^ expected one of `>`, const, identifier, lifetime, or type
error: aborting due to previous error
--> $DIR/issue-20616-4.rs:16:34
|
LL | type Type_4<T> = Type_1_<'static,, T>;
- | ^ expected one of `>`, const, identifier, lifetime, or type here
+ | ^ expected one of `>`, const, identifier, lifetime, or type
error: aborting due to previous error
--> $DIR/issue-20616-5.rs:22:34
|
LL | type Type_5<'a> = Type_1_<'a, (),,>;
- | ^ expected one of `>`, const, identifier, lifetime, or type here
+ | ^ expected one of `>`, const, identifier, lifetime, or type
error: aborting due to previous error
--> $DIR/issue-20616-6.rs:25:26
|
LL | type Type_6 = Type_5_<'a,,>;
- | ^ expected one of `>`, const, identifier, lifetime, or type here
+ | ^ expected one of `>`, const, identifier, lifetime, or type
error: aborting due to previous error
--> $DIR/issue-20616-7.rs:28:22
|
LL | type Type_7 = Box<(),,>;
- | ^ expected one of `>`, const, identifier, lifetime, or type here
+ | ^ expected one of `>`, const, identifier, lifetime, or type
error: aborting due to previous error
--> $DIR/issue-20616-8.rs:31:16
|
LL | type Type_8<'a,,> = &'a ();
- | ^ expected one of `>`, `const`, identifier, or lifetime here
+ | ^ expected one of `>`, `const`, identifier, or lifetime
error: aborting due to previous error
--> $DIR/issue-20616-9.rs:34:15
|
LL | type Type_9<T,,> = Box<T>;
- | ^ expected one of `>`, `const`, identifier, or lifetime here
+ | ^ expected one of `>`, `const`, identifier, or lifetime
error: aborting due to previous error
--> $DIR/auxiliary/issue-21146-inc.rs:3:1
|
LL | parse_error
- | ^^^^^^^^^^^ expected one of `!` or `::` here
+ | ^^^^^^^^^^^ expected one of `!` or `::`
error: aborting due to previous error
--> $DIR/issue-34334.rs:2:29
|
LL | let sr: Vec<(u32, _, _) = vec![];
- | --- ^ expected one of `,` or `>` here
+ | --- ^ expected one of `,` or `>`
| | |
| | help: use `=` if you meant to assign
| while parsing the type for `sr`
--> $DIR/issue-39616.rs:1:16
|
LL | fn foo(a: [0; 1]) {}
- | ^ expected one of `)`, `,`, `->`, `where`, or `{` here
+ | ^ expected one of `)`, `,`, `->`, `where`, or `{`
error: aborting due to 2 previous errors
--> $DIR/issue-44021.rs:3:18
|
LL | fn f() {|x, y}
- | ^ expected one of `:`, `@`, or `|` here
+ | ^ expected one of `:`, `@`, or `|`
error: aborting due to previous error
--> $DIR/issue-52496.rs:8:22
|
LL | let _ = Foo { bar.into(), bat: -1, . };
- | --- ^ expected one of `,` or `}` here
+ | --- ^ expected one of `,` or `}`
| |
| while parsing this struct
--> $DIR/issue-58856-2.rs:11:1
|
LL | }
- | - expected one of 10 possible tokens here
+ | - expected one of 10 possible tokens
LL | }
| ^ unexpected token
--> $DIR/issue-60075.rs:6:10
|
LL | });
- | ^ expected one of `.`, `;`, `?`, `else`, or an operator here
+ | ^ expected one of `.`, `;`, `?`, `else`, or an operator
error: expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `;`
--> $DIR/issue-60075.rs:6:11
--> $DIR/label_break_value_illegal_uses.rs:6:12
|
LL | unsafe 'b: {}
- | ^^ expected one of `extern`, `fn`, or `{` here
+ | ^^ expected one of `extern`, `fn`, or `{`
error: expected `{`, found `'b`
--> $DIR/label_break_value_illegal_uses.rs:10:13
--> $DIR/label_break_value_illegal_uses.rs:18:17
|
LL | match false 'b: {}
- | ----- ^^ expected one of `.`, `?`, `{`, or an operator here
+ | ----- ^^ expected one of `.`, `?`, `{`, or an operator
| |
| while parsing this match expression
|
LL | / macro_rules! pong {
LL | | () => { syntax error };
- | | ^^^^^ expected one of 8 possible tokens here
+ | | ^^^^^ expected one of 8 possible tokens
LL | | }
| |_- in this expansion of `pong!`
...
|
LL | / macro_rules! pong {
LL | | () => { syntax error };
- | | ^^^^^ expected one of 8 possible tokens here
+ | | ^^^^^ expected one of 8 possible tokens
LL | | }
| |_- in this expansion of `pong!`
...
|
LL | / macro_rules! pong {
LL | | () => { syntax error };
- | | ^^^^^ expected one of 8 possible tokens here
+ | | ^^^^^ expected one of 8 possible tokens
LL | | }
| |_- in this expansion of `pong!` (#5)
...
--> $DIR/assert-trailing-junk.rs:6:18
|
LL | assert!(true some extra junk, "whatever");
- | ^^^^ expected one of `,`, `.`, `?`, or an operator here
+ | ^^^^ expected one of `,`, `.`, `?`, or an operator
error: expected one of `,`, `.`, `?`, or an operator, found `some`
--> $DIR/assert-trailing-junk.rs:9:18
|
LL | assert!(true some extra junk);
- | ^^^^ expected one of `,`, `.`, `?`, or an operator here
+ | ^^^^ expected one of `,`, `.`, `?`, or an operator
error: no rules expected the token `blah`
--> $DIR/assert-trailing-junk.rs:12:30
--> $DIR/issue-54441.rs:3:9
|
LL | let
- | ^^^ expected one of `crate`, `fn`, `pub`, `static`, or `type` here
+ | ^^^ expected one of `crate`, `fn`, `pub`, `static`, or `type`
...
LL | m!();
| ----- in this macro invocation
--> $DIR/malformed-derive-entry.rs:1:14
|
LL | #[derive(Copy(Bad))]
- | ^ expected one of `)`, `,`, or `::` here
+ | ^ expected one of `)`, `,`, or `::`
error: expected one of `)`, `,`, or `::`, found `=`
--> $DIR/malformed-derive-entry.rs:4:14
|
LL | #[derive(Copy="bad")]
- | ^ expected one of `)`, `,`, or `::` here
+ | ^ expected one of `)`, `,`, or `::`
error: malformed `derive` attribute input
--> $DIR/malformed-derive-entry.rs:7:1
--> $DIR/recovered-block.rs:19:9
|
LL | Foo { text: "".to_string() }
- | ^ expected one of `(` or `<` here
+ | ^ expected one of `(` or `<`
error: aborting due to 2 previous errors
&None => 1,
&Some(2) => { 3 }
//~^ ERROR expected one of `,`, `.`, `?`, `}`, or an operator, found `=>`
- //~| NOTE expected one of `,`, `.`, `?`, `}`, or an operator here
+ //~| NOTE expected one of `,`, `.`, `?`, `}`, or an operator
_ => 2
};
}
&None => 1
&Some(2) => { 3 }
//~^ ERROR expected one of `,`, `.`, `?`, `}`, or an operator, found `=>`
- //~| NOTE expected one of `,`, `.`, `?`, `}`, or an operator here
+ //~| NOTE expected one of `,`, `.`, `?`, `}`, or an operator
_ => 2
};
}
LL | &None => 1
| - help: missing a comma here to end this `match` arm
LL | &Some(2) => { 3 }
- | ^^ expected one of `,`, `.`, `?`, `}`, or an operator here
+ | ^^ expected one of `,`, `.`, `?`, `}`, or an operator
error: aborting due to previous error
--> $DIR/expected-comma-found-token.rs:9:5
|
LL | message="the message"
- | - expected one of `)` or `,` here
+ | - expected one of `)` or `,`
LL | label="the label"
| ^^^^^ unexpected token
--> $DIR/assoc-oddities-1.rs:10:28
|
LL | ..if c { a } else { b }[n];
- | ^ expected one of `.`, `;`, `?`, or `}` here
+ | ^ expected one of `.`, `;`, `?`, or `}`
error: aborting due to previous error
--> $DIR/assoc-oddities-2.rs:5:29
|
LL | x..if c { a } else { b }[n];
- | ^ expected one of `.`, `;`, `?`, or `}` here
+ | ^ expected one of `.`, `;`, `?`, or `}`
error: aborting due to previous error
--> $DIR/associated-types-project-from-hrtb-explicit.rs:10:29
|
LL | fn foo2<I>(x: <I as for<'x> Foo<&'x isize>>::A)
- | ^^^ expected one of `::` or `>` here
+ | ^^^ expected one of `::` or `>`
error: aborting due to 2 previous errors
--> $DIR/attr-bad-meta.rs:1:7
|
LL | #[path*]
- | ^ expected one of `(`, `::`, `=`, `[`, `]`, or `{` here
+ | ^ expected one of `(`, `::`, `=`, `[`, `]`, or `{`
error: aborting due to previous error
--> $DIR/bad-match.rs:2:13
|
LL | let isize x = 5;
- | ^ expected one of `:`, `;`, `=`, `@`, or `|` here
+ | ^ expected one of `:`, `;`, `=`, `@`, or `|`
error: aborting due to previous error
--> $DIR/bad-name.rs:4:8
|
LL | let x.y::<isize>.z foo;
- | ^ expected one of `:`, `;`, `=`, `@`, or `|` here
+ | ^ expected one of `:`, `;`, `=`, `@`, or `|`
error: aborting due to previous error
--> $DIR/better-expected.rs:2:19
|
LL | let x: [isize 3];
- | - ^ expected one of 7 possible tokens here
+ | - ^ expected one of 7 possible tokens
| |
| while parsing the type for `x`
--> $DIR/bounds-lifetime-1.rs:1:17
|
LL | type A = for<'a 'b> fn();
- | ^^ expected one of `,`, `:`, or `>` here
+ | ^^ expected one of `,`, `:`, or `>`
error: aborting due to previous error
--> $DIR/bounds-lifetime-2.rs:1:17
|
LL | type A = for<'a + 'b> fn();
- | ^ expected one of `,`, `:`, or `>` here
+ | ^ expected one of `,`, `:`, or `>`
error: aborting due to previous error
--> $DIR/bounds-lifetime-where.rs:8:14
|
LL | type A where , = u8;
- | ^ expected one of `=`, lifetime, or type here
+ | ^ expected one of `=`, lifetime, or type
error: aborting due to previous error
--> $DIR/bounds-lifetime.rs:9:14
|
LL | type A = for<,> fn();
- | ^ expected one of `>`, `const`, identifier, or lifetime here
+ | ^ expected one of `>`, `const`, identifier, or lifetime
error: aborting due to previous error
--> $DIR/bounds-type-where.rs:8:15
|
LL | type A where T, = u8;
- | ^ expected one of 8 possible tokens here
+ | ^ expected one of 8 possible tokens
error: aborting due to previous error
--> $DIR/class-implements-bad-trait.rs:2:7
|
LL | class cat : nonexistent {
- | ^^^ expected one of `!` or `::` here
+ | ^^^ expected one of `!` or `::`
error: aborting due to previous error
--> $DIR/closure-return-syntax.rs:5:23
|
LL | let x = || -> i32 22;
- | ^^ expected one of `!`, `(`, `+`, `::`, `<`, or `{` here
+ | ^^ expected one of `!`, `(`, `+`, `::`, `<`, or `{`
error: aborting due to previous error
--> $DIR/default.rs:22:13
|
LL | default pub fn foo<T: Default>() -> T { T::default() }
- | ^^^ expected one of `async`, `const`, `extern`, `fn`, `type`, or `unsafe` here
+ | ^^^ expected one of `async`, `const`, `extern`, `fn`, `type`, or `unsafe`
error[E0449]: unnecessary visibility qualifier
--> $DIR/default.rs:16:5
--> $DIR/duplicate-visibility.rs:3:9
|
LL | pub pub fn foo();
- | ^^^ expected one of `(`, `fn`, `static`, or `type` here
+ | ^^^ expected one of `(`, `fn`, `static`, or `type`
error: aborting due to previous error
--> $DIR/empty-impl-semicolon.rs:1:9
|
LL | impl Foo;
- | ^ expected one of 8 possible tokens here
+ | ^ expected one of 8 possible tokens
error: aborting due to previous error
--> $DIR/extern-crate-unexpected-token.rs:1:8
|
LL | extern crte foo;
- | ^^^^ expected one of `crate`, `fn`, or `{` here
+ | ^^^^ expected one of `crate`, `fn`, or `{`
error: aborting due to previous error
--> $DIR/extern-expected-fn-or-brace.rs:4:12
|
LL | extern "C" mod foo;
- | ^^^ expected one of `fn` or `{` here
+ | ^^^ expected one of `fn` or `{`
error: aborting due to previous error
--> $DIR/extern-foreign-crate.rs:4:18
|
LL | extern crate foo {}
- | ^ expected one of `;` or `as` here
+ | ^ expected one of `;` or `as`
error: aborting due to previous error
LL | fn foo(&self, &str bar) {}
| -----^^^
| | |
- | | expected one of `:`, `@`, or `|` here
+ | | expected one of `:`, `@`, or `|`
| help: declare the type after the parameter binding: `<identifier>: <type>`
error: expected one of `:`, `@`, or `|`, found `quux`
LL | fn baz(S quux, xyzzy: i32) {}
| --^^^^
| | |
- | | expected one of `:`, `@`, or `|` here
+ | | expected one of `:`, `@`, or `|`
| help: declare the type after the parameter binding: `<identifier>: <type>`
error: expected one of `:`, `@`, or `|`, found `a`
--> $DIR/inverted-parameters.rs:15:12
|
LL | fn one(i32 a b) {}
- | ^ expected one of `:`, `@`, or `|` here
+ | ^ expected one of `:`, `@`, or `|`
error: expected one of `:` or `|`, found `(`
--> $DIR/inverted-parameters.rs:18:23
|
LL | fn pattern((i32, i32) (a, b)) {}
- | ^ expected one of `:` or `|` here
+ | ^ expected one of `:` or `|`
error: expected one of `:`, `@`, or `|`, found `)`
--> $DIR/inverted-parameters.rs:21:12
|
LL | fn fizz(i32) {}
- | ^ expected one of `:`, `@`, or `|` here
+ | ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this was a parameter name, give it a type
LL | fn missing_colon(quux S) {}
| -----^
| | |
- | | expected one of `:`, `@`, or `|` here
+ | | expected one of `:`, `@`, or `|`
| help: declare the type after the parameter binding: `<identifier>: <type>`
error: aborting due to 6 previous errors
//~^ ERROR expected identifier, found keyword `return`
//~| NOTE expected identifier, found keyword
}
- //~^ NOTE expected one of `.`, `=>`, `?`, or an operator here
+ //~^ NOTE expected one of `.`, `=>`, `?`, or an operator
_ => {}
//~^ ERROR expected one of `.`, `=>`, `?`, or an operator, found reserved identifier `_`
//~| NOTE unexpected token
--> $DIR/issue-15980.rs:13:9
|
LL | }
- | - expected one of `.`, `=>`, `?`, or an operator here
+ | - expected one of `.`, `=>`, `?`, or an operator
LL |
LL | _ => {}
| ^ unexpected token
--> $DIR/issue-17904.rs:4:33
|
LL | struct Foo<T> where T: Copy, (T);
- | ^ expected one of `:`, `==`, or `=` here
+ | ^ expected one of `:`, `==`, or `=`
error: aborting due to previous error
--> $DIR/issue-19096.rs:3:8
|
LL | t.0::<isize>;
- | ^^ expected one of `.`, `;`, `?`, `}`, or an operator here
+ | ^^ expected one of `.`, `;`, `?`, `}`, or an operator
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `::`
--> $DIR/issue-19096.rs:8:8
|
LL | t.0::<isize>;
- | ^^ expected one of `.`, `;`, `?`, `}`, or an operator here
+ | ^^ expected one of `.`, `;`, `?`, `}`, or an operator
error: aborting due to 2 previous errors
--> $DIR/issue-20711-2.rs:7:1
|
LL | #[stable(feature = "rust1", since = "1.0.0")]
- | - expected one of 9 possible tokens here
+ | - expected one of 9 possible tokens
LL | }
| ^ unexpected token
--> $DIR/issue-20711.rs:5:1
|
LL | #[stable(feature = "rust1", since = "1.0.0")]
- | - expected one of 9 possible tokens here
+ | - expected one of 9 possible tokens
LL | }
| ^ unexpected token
--> $DIR/issue-22647.rs:2:15
|
LL | let caller<F> = |f: F|
- | ^ expected one of `:`, `;`, `=`, `@`, or `|` here
+ | ^ expected one of `:`, `;`, `=`, `@`, or `|`
error: aborting due to previous error
--> $DIR/issue-22712.rs:6:12
|
LL | let Foo<Vec<u8>>
- | ^ expected one of `:`, `;`, `=`, `@`, or `|` here
+ | ^ expected one of `:`, `;`, `=`, `@`, or `|`
error: aborting due to previous error
--> $DIR/issue-24197.rs:2:12
|
LL | let buf[0] = 0;
- | ^ expected one of `:`, `;`, `=`, `@`, or `|` here
+ | ^ expected one of `:`, `;`, `=`, `@`, or `|`
error: aborting due to previous error
--> $DIR/issue-24375.rs:6:12
|
LL | tmp[0] => {}
- | ^ expected one of `=>`, `@`, `if`, or `|` here
+ | ^ expected one of `=>`, `@`, `if`, or `|`
error: aborting due to previous error
--> $DIR/issue-24780.rs:5:23
|
LL | fn foo() -> Vec<usize>> {
- | ^ expected one of `!`, `+`, `::`, `where`, or `{` here
+ | ^ expected one of `!`, `+`, `::`, `where`, or `{`
error: aborting due to previous error
--> $DIR/issue-32446.rs:4:11
|
LL | trait T { ... }
- | ^^^ expected one of 7 possible tokens here
+ | ^^^ expected one of 7 possible tokens
error: aborting due to previous error
--> $DIR/issue-33455.rs:1:8
|
LL | use foo.bar;
- | ^ expected one of `::`, `;`, or `as` here
+ | ^ expected one of `::`, `;`, or `as`
error: aborting due to previous error
--> $DIR/issue-41155.rs:5:1
|
LL | pub
- | - expected one of 8 possible tokens here
+ | - expected one of 8 possible tokens
LL | }
| ^ unexpected token
--> $DIR/issue-62660.rs:7:38
|
LL | pub fn foo(_: i32, self: Box<Self) {}
- | ^ expected one of 7 possible tokens here
+ | ^ expected one of 7 possible tokens
error: aborting due to previous error
--> $DIR/issue-62973.rs:6:25
|
LL | fn p() { match s { v, E { [) {) }
- | - - -^ expected one of `,` or `}` here
+ | - - -^ expected one of `,` or `}`
| | | |
| | | help: `}` may belong here
| | while parsing this struct
| ----- while parsing this match expression
LL |
LL |
- | ^ expected one of `.`, `?`, `{`, or an operator here
+ | ^ expected one of `.`, `?`, `{`, or an operator
error: incorrect close delimiter: `)`
--> $DIR/issue-62973.rs:6:28
--> $DIR/issue-63135.rs:3:16
|
LL | fn i(n{...,f #
- | ^ expected one of `:` or `|` here
+ | ^ expected one of `:` or `|`
error: aborting due to 5 previous errors
--> $DIR/lifetime-semicolon.rs:5:30
|
LL | fn foo<'a, 'b>(x: &mut Foo<'a; 'b>) {}
- | ^ expected one of `,` or `>` here
+ | ^ expected one of `,` or `>`
error: aborting due to previous error
--> $DIR/issue-37234.rs:3:19
|
LL | let x = 5 "";
- | ^^ expected one of `.`, `;`, `?`, or an operator here
+ | ^^ expected one of `.`, `;`, `?`, or an operator
...
LL | failed!();
| ---------- in this macro invocation
--> $DIR/macro-incomplete-parse.rs:10:14
|
LL | () => ( 1,
- | ^ expected one of `.`, `;`, `?`, `}`, or an operator here
+ | ^ expected one of `.`, `;`, `?`, `}`, or an operator
...
LL | ignored_expr!();
| ---------------- in this macro invocation
--> $DIR/trait-non-item-macros.rs:2:19
|
LL | ($a:expr) => ($a)
- | ^^ expected one of `async`, `const`, `extern`, `fn`, `type`, or `unsafe` here
+ | ^^ expected one of `async`, `const`, `extern`, `fn`, `type`, or `unsafe`
...
LL | bah!(2);
| -------- in this macro invocation
--> $DIR/macros-no-semicolon.rs:3:5
|
LL | assert_eq!(1, 2)
- | - expected one of `.`, `;`, `?`, `}`, or an operator here
+ | - expected one of `.`, `;`, `?`, `}`, or an operator
LL | assert_eq!(3, 4)
| ^^^^^^^^^ unexpected token
let foo =
match //~ NOTE while parsing this match expression
Some(4).unwrap_or_else(5)
- //~^ NOTE expected one of `.`, `?`, `{`, or an operator here
+ //~^ NOTE expected one of `.`, `?`, `{`, or an operator
; //~ NOTE unexpected token
//~^ ERROR expected one of `.`, `?`, `{`, or an operator, found `;`
| while parsing this match expression
| help: try removing this `match`
LL | Some(4).unwrap_or_else(5)
- | - expected one of `.`, `?`, `{`, or an operator here
+ | - expected one of `.`, `?`, `{`, or an operator
LL |
LL | ;
| ^ unexpected token
LL | fn foo(&self) {}
| -
| |
- | expected one of 10 possible tokens here
+ | expected one of 10 possible tokens
| help: `}` may belong here
LL |
LL | trait T {
LL | fn foo(&self);
| -
| |
- | expected one of 7 possible tokens here
+ | expected one of 7 possible tokens
| help: `}` may belong here
LL |
LL | pub(crate) struct Bar<T>();
--> $DIR/missing_right_paren.rs:3:11
|
LL | fn main((ؼ
- | ^ expected one of `:` or `|` here
+ | ^ expected one of `:` or `|`
error: aborting due to 2 previous errors
--> $DIR/multitrait.rs:5:9
|
LL | impl Cmp, ToString for S {
- | ^ expected one of 8 possible tokens here
+ | ^ expected one of 8 possible tokens
error: aborting due to previous error
--> $DIR/not-a-pred.rs:3:26
|
LL | fn f(a: isize, b: isize) : lt(a, b) { }
- | ^ expected one of `->`, `where`, or `{` here
+ | ^ expected one of `->`, `where`, or `{`
error: aborting due to previous error
--> $DIR/omitted-arg-in-item-fn.rs:1:9
|
LL | fn foo(x) {
- | ^ expected one of `:`, `@`, or `|` here
+ | ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this was a parameter name, give it a type
--> $DIR/pat-lt-bracket-1.rs:3:7
|
LL | x < 7 => (),
- | ^ expected one of `=>`, `@`, `if`, or `|` here
+ | ^ expected one of `=>`, `@`, `if`, or `|`
error: aborting due to previous error
--> $DIR/pat-lt-bracket-2.rs:1:7
|
LL | fn a(B<) {}
- | ^ expected one of `:`, `@`, or `|` here
+ | ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this is a type, explicitly ignore the parameter name
--> $DIR/pat-lt-bracket-3.rs:6:16
|
LL | Foo<T>(x, y) => {
- | ^ expected one of `=>`, `@`, `if`, or `|` here
+ | ^ expected one of `=>`, `@`, `if`, or `|`
error: aborting due to previous error
--> $DIR/pat-lt-bracket-4.rs:8:12
|
LL | Foo<T>::A(value) => value,
- | ^ expected one of `=>`, `@`, `if`, or `|` here
+ | ^ expected one of `=>`, `@`, `if`, or `|`
error: aborting due to previous error
--> $DIR/pat-lt-bracket-5.rs:2:10
|
LL | let v[0] = v[1];
- | ^ expected one of `:`, `;`, `=`, `@`, or `|` here
+ | ^ expected one of `:`, `;`, `=`, `@`, or `|`
error: aborting due to previous error
--> $DIR/pat-lt-bracket-6.rs:5:19
|
LL | let Test(&desc[..]) = x;
- | ^ expected one of `)`, `,`, `@`, or `|` here
+ | ^ expected one of `)`, `,`, `@`, or `|`
error[E0658]: subslice patterns are unstable
--> $DIR/pat-lt-bracket-6.rs:5:20
--> $DIR/pat-lt-bracket-7.rs:5:16
|
LL | for Thing(x[]) in foo {}
- | ^ expected one of `)`, `,`, `@`, or `|` here
+ | ^ expected one of `)`, `,`, `@`, or `|`
error[E0308]: mismatched types
--> $DIR/pat-lt-bracket-7.rs:9:30
--> $DIR/pat-ranges-1.rs:4:21
|
LL | let macropus!() ..= 11 = 12;
- | ^^^ expected one of `:`, `;`, `=`, or `|` here
+ | ^^^ expected one of `:`, `;`, `=`, or `|`
error: aborting due to previous error
--> $DIR/pat-ranges-2.rs:4:26
|
LL | let 10 ..= makropulos!() = 12;
- | ^ expected one of `::`, `:`, `;`, `=`, or `|` here
+ | ^ expected one of `::`, `:`, `;`, `=`, or `|`
error: aborting due to previous error
--> $DIR/pat-ranges-3.rs:4:19
|
LL | let 10 ..= 10 + 3 = 12;
- | ^ expected one of `:`, `;`, `=`, or `|` here
+ | ^ expected one of `:`, `;`, `=`, or `|`
error: aborting due to previous error
--> $DIR/pat-ranges-4.rs:4:12
|
LL | let 10 - 3 ..= 10 = 8;
- | ^ expected one of 7 possible tokens here
+ | ^ expected one of 7 possible tokens
error: aborting due to previous error
--> $DIR/range-3.rs:4:17
|
LL | let r = 1..2..3;
- | ^^ expected one of `.`, `;`, `?`, or an operator here
+ | ^^ expected one of `.`, `;`, `?`, or an operator
error: aborting due to previous error
--> $DIR/range-4.rs:4:16
|
LL | let r = ..1..2;
- | ^^ expected one of `.`, `;`, `?`, or an operator here
+ | ^^ expected one of `.`, `;`, `?`, or an operator
error: aborting due to previous error
--> $DIR/raw-str-unbalanced.rs:3:9
|
LL | "##
- | ^ expected one of `.`, `;`, `?`, or an operator here
+ | ^ expected one of `.`, `;`, `?`, or an operator
error: aborting due to previous error
--> $DIR/raw-literal-keywords.rs:2:10
|
LL | r#if true { }
- | ^^^^ expected one of 8 possible tokens here
+ | ^^^^ expected one of 8 possible tokens
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `Test`
--> $DIR/raw-literal-keywords.rs:6:14
|
LL | r#struct Test;
- | ^^^^ expected one of 8 possible tokens here
+ | ^^^^ expected one of 8 possible tokens
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `Test`
--> $DIR/raw-literal-keywords.rs:10:13
|
LL | r#union Test;
- | ^^^^ expected one of 8 possible tokens here
+ | ^^^^ expected one of 8 possible tokens
error[E0425]: cannot find value `if` in this scope
--> $DIR/raw-literal-keywords.rs:14:13
--> $DIR/recover-enum2.rs:25:22
|
LL | Nope(i32 {})
- | ^ expected one of 7 possible tokens here
+ | ^ expected one of 7 possible tokens
error: aborting due to 2 previous errors
--> $DIR/recover-for-loop-parens-around-head.rs:10:16
|
LL | for ( elem in vec ) {
- | ^^ expected one of `)`, `,`, `@`, or `|` here
+ | ^^ expected one of `)`, `,`, `@`, or `|`
error: unexpected closing `)`
--> $DIR/recover-for-loop-parens-around-head.rs:10:23
--> $DIR/removed-syntax-closure-lifetime.rs:1:22
|
LL | type closure = Box<lt/fn()>;
- | ^ expected one of 7 possible tokens here
+ | ^ expected one of 7 possible tokens
error: aborting due to previous error
--> $DIR/removed-syntax-enum-newtype.rs:1:8
|
LL | enum e = isize;
- | ^ expected one of `<`, `where`, or `{` here
+ | ^ expected one of `<`, `where`, or `{`
error: aborting due to previous error
--> $DIR/removed-syntax-fixed-vec.rs:1:17
|
LL | type v = [isize * 3];
- | ^ expected one of 7 possible tokens here
+ | ^ expected one of 7 possible tokens
error: aborting due to previous error
--> $DIR/removed-syntax-ptr-lifetime.rs:1:22
|
LL | type bptr = &lifetime/isize;
- | ^ expected one of `!`, `(`, `::`, `;`, or `<` here
+ | ^ expected one of `!`, `(`, `::`, `;`, or `<`
error: aborting due to previous error
--> $DIR/removed-syntax-static-fn.rs:4:5
|
LL | impl S {
- | - expected one of 10 possible tokens here
+ | - expected one of 10 possible tokens
LL | static fn f() {}
| ^^^^^^ unexpected token
--> $DIR/removed-syntax-uniq-mut-ty.rs:1:20
|
LL | type mut_box = Box<mut isize>;
- | ^^^ expected one of `>`, const, lifetime, or type here
+ | ^^^ expected one of `>`, const, lifetime, or type
error: aborting due to previous error
--> $DIR/removed-syntax-with-1.rs:8:25
|
LL | let b = S { foo: () with a, bar: () };
- | - ^^^^ expected one of `,`, `.`, `?`, `}`, or an operator here
+ | - ^^^^ expected one of `,`, `.`, `?`, `}`, or an operator
| |
| while parsing this struct
--> $DIR/removed-syntax-with-2.rs:8:31
|
LL | let b = S { foo: (), with a };
- | - ^ expected one of `,` or `}` here
+ | - ^ expected one of `,` or `}`
| |
| while parsing this struct
--> $DIR/underscore_item_not_const.rs:28:7
|
LL | union _ { f: u8 }
- | ^ expected one of `!` or `::` here
+ | ^ expected one of `!` or `::`
error: aborting due to 15 previous errors
--> $DIR/use-as-where-use-ends-with-mod-sep.rs:1:19
|
LL | use std::any:: as foo;
- | ^^^ expected one of `::`, `;`, or `as` here
+ | ^^^ expected one of `::`, `;`, or `as`
error: aborting due to 2 previous errors
--> $DIR/token-error-correct-3.rs:18:9
|
LL | fs::create_dir_all(path.as_ref()).map(|()| true)
- | - expected one of `.`, `;`, `?`, `}`, or an operator here
+ | - expected one of `.`, `;`, `?`, `}`, or an operator
LL | } else {
| ^ unexpected token
--> $DIR/disallowed-positions.rs:242:14
|
LL | true && let 1 = 1
- | ^^ expected one of `,` or `>` here
+ | ^^ expected one of `,` or `>`
error: `let` expressions are not supported here
--> $DIR/disallowed-positions.rs:32:9
--> $DIR/param-attrs-2018.rs:3:41
|
LL | trait Trait2015 { fn foo(#[allow(C)] i32); }
- | ^ expected one of `:`, `@`, or `|` here
+ | ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this is a `self` type, give it a parameter name
--> $DIR/empty_generics.rs:5:14
|
LL | type Bar<,>;
- | ^ expected one of `>`, `const`, identifier, or lifetime here
+ | ^ expected one of `>`, `const`, identifier, or lifetime
warning: the feature `generic_associated_types` is incomplete and may cause the compiler to crash
--> $DIR/empty_generics.rs:1:12
--> $DIR/similar-tokens.rs:7:10
|
LL | use x::{A. B};
- | ^ expected one of `,`, `::`, `as`, or `}` here
+ | ^ expected one of `,`, `::`, `as`, or `}`
error: aborting due to previous error
--> $DIR/issue-34264.rs:1:14
|
LL | fn foo(Option<i32>, String) {}
- | ^ expected one of `:`, `@`, or `|` here
+ | ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this is a type, explicitly ignore the parameter name
--> $DIR/issue-34264.rs:1:27
|
LL | fn foo(Option<i32>, String) {}
- | ^ expected one of `:`, `@`, or `|` here
+ | ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this was a parameter name, give it a type
--> $DIR/issue-34264.rs:3:9
|
LL | fn bar(x, y: usize) {}
- | ^ expected one of `:`, `@`, or `|` here
+ | ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this was a parameter name, give it a type
--> $DIR/issue-64252-self-type.rs:4:15
|
LL | pub fn foo(Box<Self>) { }
- | ^ expected one of `:`, `@`, or `|` here
+ | ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this is a type, explicitly ignore the parameter name
--> $DIR/issue-64252-self-type.rs:10:15
|
LL | fn bar(Box<Self>) { }
- | ^ expected one of `:`, `@`, or `|` here
+ | ^ expected one of `:`, `@`, or `|`
|
= note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this is a `self` type, give it a parameter name
--> $DIR/test.rs:4:26
|
LL | struct S2(pub((foo)) ());
- | ^ expected one of `)` or `,` here
+ | ^ expected one of `)` or `,`
error[E0412]: cannot find type `foo` in this scope
--> $DIR/test.rs:4:20
--> $DIR/test2.rs:5:26
|
LL | struct S3(pub $t ());
- | ^ expected one of `)` or `,` here
+ | ^ expected one of `)` or `,`
...
LL | define_struct! { (foo) }
| ------------------------ in this macro invocation
--> $DIR/test3.rs:5:27
|
LL | struct S3(pub($t) ());
- | ^ expected one of `)` or `,` here
+ | ^ expected one of `)` or `,`
...
LL | define_struct! { foo }
| ---------------------- in this macro invocation
--> $DIR/issue-54516.rs:4:58
|
LL | println!("{}", std::mem:size_of::<BTreeMap<u32, u32>>());
- | - ^ expected one of `!`, `,`, or `::` here
+ | - ^ expected one of `!`, `,`, or `::`
| |
| help: maybe write a path separator here: `::`
|
--> $DIR/issue-60933.rs:2:43
|
LL | let u: usize = std::mem:size_of::<u32>();
- | - ^ expected one of `!`, `::`, or `;` here
+ | - ^ expected one of `!`, `::`, or `;`
| |
| help: maybe write a path separator here: `::`
|
--> $DIR/unsafe-block-without-braces.rs:3:9
|
LL | unsafe //{
- | - expected one of `extern`, `fn`, or `{` here
+ | - expected one of `extern`, `fn`, or `{`
LL | std::mem::transmute::<f32, u32>(1.0);
| ^^^ unexpected token