Skip to content

Commit

Permalink
Rollup merge of rust-lang#66007 - estebank:remove-here, r=Centril
Browse files Browse the repository at this point in the history
Remove "here" from "expected one of X here"
  • Loading branch information
Centril authored Nov 8, 2019
2 parents 7ab50e4 + 52e8ec1 commit 5a6fd11
Show file tree
Hide file tree
Showing 132 changed files with 156 additions and 156 deletions.
2 changes: 1 addition & 1 deletion src/libsyntax/parse/parser/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ impl<'a> Parser<'a> {
};
(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()))
Expand Down
8 changes: 4 additions & 4 deletions src/test/ui/anon-params-denied-2018.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `:`, `@`, or `|`, found `)`
--> $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
Expand All @@ -22,7 +22,7 @@ error: expected one of `:`, `@`, or `|`, found `,`
--> $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
Expand All @@ -42,7 +42,7 @@ error: expected one of `:`, `@`, or `|`, found `)`
--> $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
Expand All @@ -58,7 +58,7 @@ error: expected one of `:`, `@`, or `|`, found `,`
--> $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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ error: expected one of `.`, `?`, `{`, or an operator, found `}`
--> $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
...
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/async-await/no-async-const.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `fn` or `unsafe`, found keyword `const`
--> $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

4 changes: 2 additions & 2 deletions src/test/ui/async-await/no-unsafe-async.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ error: expected one of `extern` or `fn`, found keyword `async`
--> $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

2 changes: 1 addition & 1 deletion src/test/ui/can-begin-expr-check.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `.`, `;`, `?`, `}`, or an operator, found keyword `enum`
--> $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

2 changes: 1 addition & 1 deletion src/test/ui/codemap_tests/bad-format-args.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ error: expected one of `,`, `.`, `?`, or an operator, found `1`
--> $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

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `,` or `>`, found `+`
--> $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
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/did_you_mean/issue-40006.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ error: expected one of `!` or `::`, found `(`
--> $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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ error: expected one of `!`, `)`, `,`, `.`, `::`, `?`, `{`, or an operator, found
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`
Expand All @@ -33,7 +33,7 @@ error: expected one of `!`, `)`, `,`, `.`, `::`, `?`, `{`, or an operator, found
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`
Expand All @@ -42,7 +42,7 @@ 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`
Expand All @@ -51,7 +51,7 @@ 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ error: macro expansion ends with an incomplete expression: expected one of `move
--> <::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
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ error: macro expansion ends with an incomplete expression: expected one of `move
--> <::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
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `!` or `::`, found `-`
--> $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

2 changes: 1 addition & 1 deletion src/test/ui/imports/import-prefix-macro-1.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `::`, `;`, or `as`, found `{`
--> $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
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/invalid/invalid-variadic-function.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ error: expected one of `->`, `where`, or `{`, found `;`
--> $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

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-20616-1.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `,`, `:`, or `>`, found `T`
--> $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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-20616-2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `,` or `>`, found `(`
--> $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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-20616-3.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `>`, const, identifier, lifetime, or type, found `,`
--> $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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-20616-4.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `>`, const, identifier, lifetime, or type, found `,`
--> $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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-20616-5.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `>`, const, identifier, lifetime, or type, found `,`
--> $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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-20616-6.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `>`, const, identifier, lifetime, or type, found `,`
--> $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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-20616-7.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `>`, const, identifier, lifetime, or type, found `,`
--> $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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-20616-8.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `>`, `const`, identifier, or lifetime, found `,`
--> $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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-20616-9.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `>`, `const`, identifier, or lifetime, found `,`
--> $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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-21146.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `!` or `::`, found `<eof>`
--> $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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-34334.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ error: expected one of `,` or `>`, found `=`
--> $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`
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-39616.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ error: expected one of `)`, `,`, `->`, `where`, or `{`, found `]`
--> $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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-44021.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `:`, `@`, or `|`, found `}`
--> $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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-52496.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ error: expected one of `,` or `}`, found `.`
--> $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

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-58856-2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ error: expected one of `async`, `const`, `crate`, `default`, `extern`, `fn`, `pu
--> $DIR/issue-58856-2.rs:11:1
|
LL | }
| - expected one of 10 possible tokens here
| - expected one of 10 possible tokens
LL | }
| ^ unexpected token

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-60075.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `.`, `;`, `?`, `else`, or an operator, found `}`
--> $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
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/label/label_break_value_illegal_uses.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: expected one of `extern`, `fn`, or `{`, found `'b`
--> $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
Expand All @@ -27,7 +27,7 @@ error: expected one of `.`, `?`, `{`, or an operator, found `'b`
--> $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

Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/macro_backtrace/main.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found
|
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!`
...
Expand All @@ -15,7 +15,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found
|
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!`
...
Expand All @@ -35,7 +35,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found
|
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)
...
Expand Down
Loading

0 comments on commit 5a6fd11

Please sign in to comment.