diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
commit | 9918693037dce8aa4bb6f08741b6812923486c18 (patch) | |
tree | 21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /tests/ui/parser | |
parent | Releasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff) | |
download | rustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/parser')
480 files changed, 1629 insertions, 513 deletions
diff --git a/tests/ui/parser/assoc/assoc-oddities-1.stderr b/tests/ui/parser/assoc/assoc-oddities-1.stderr index acf71b489..0d49d542f 100644 --- a/tests/ui/parser/assoc/assoc-oddities-1.stderr +++ b/tests/ui/parser/assoc/assoc-oddities-1.stderr @@ -4,5 +4,5 @@ error: expected one of `.`, `;`, `?`, or `}`, found `[` LL | ..if c { a } else { b }[n]; | ^ expected one of `.`, `;`, `?`, or `}` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/assoc/assoc-oddities-2.stderr b/tests/ui/parser/assoc/assoc-oddities-2.stderr index d3b90c34c..5ba8eb51b 100644 --- a/tests/ui/parser/assoc/assoc-oddities-2.stderr +++ b/tests/ui/parser/assoc/assoc-oddities-2.stderr @@ -4,5 +4,5 @@ error: expected one of `.`, `;`, `?`, or `}`, found `[` LL | x..if c { a } else { b }[n]; | ^ expected one of `.`, `;`, `?`, or `}` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/assoc/assoc-type-in-type-arg.stderr b/tests/ui/parser/assoc/assoc-type-in-type-arg.stderr index b637702f2..259a836d0 100644 --- a/tests/ui/parser/assoc/assoc-type-in-type-arg.stderr +++ b/tests/ui/parser/assoc/assoc-type-in-type-arg.stderr @@ -4,5 +4,5 @@ error: bounds on associated types do not belong here LL | struct Bar<'a, Item: Tr, <Item as Tr>::TrSubtype: 'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ belongs in `where` clause -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/attribute/attr-bad-meta-2.stderr b/tests/ui/parser/attribute/attr-bad-meta-2.stderr index 6fc6fb665..98321827d 100644 --- a/tests/ui/parser/attribute/attr-bad-meta-2.stderr +++ b/tests/ui/parser/attribute/attr-bad-meta-2.stderr @@ -4,5 +4,5 @@ error: expected expression, found `]` LL | #[path =] | ^ expected expression -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/attribute/attr-bad-meta-3.stderr b/tests/ui/parser/attribute/attr-bad-meta-3.stderr index 4fa420c79..13eed2e1d 100644 --- a/tests/ui/parser/attribute/attr-bad-meta-3.stderr +++ b/tests/ui/parser/attribute/attr-bad-meta-3.stderr @@ -4,5 +4,5 @@ error: expected `]`, found `token` LL | #[path() token] | ^^^^^ expected `]` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/attribute/attr-bad-meta.stderr b/tests/ui/parser/attribute/attr-bad-meta.stderr index 8d65c423c..4ca7d6d9f 100644 --- a/tests/ui/parser/attribute/attr-bad-meta.stderr +++ b/tests/ui/parser/attribute/attr-bad-meta.stderr @@ -4,5 +4,5 @@ error: expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*` LL | #[path*] | ^ expected one of `(`, `::`, `=`, `[`, `]`, or `{` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/attribute/attr-before-eof.stderr b/tests/ui/parser/attribute/attr-before-eof.stderr index a2acb9437..18a9d77bf 100644 --- a/tests/ui/parser/attribute/attr-before-eof.stderr +++ b/tests/ui/parser/attribute/attr-before-eof.stderr @@ -4,5 +4,5 @@ error: expected item after attributes LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/attribute/attr-dangling-in-fn.stderr b/tests/ui/parser/attribute/attr-dangling-in-fn.stderr index b1bb3ab3b..c7b948ea8 100644 --- a/tests/ui/parser/attribute/attr-dangling-in-fn.stderr +++ b/tests/ui/parser/attribute/attr-dangling-in-fn.stderr @@ -4,5 +4,5 @@ error: expected statement after outer attribute LL | #[foo = "bar"] | ^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/attribute/attr-dangling-in-mod.stderr b/tests/ui/parser/attribute/attr-dangling-in-mod.stderr index 1c892eac0..882400c1d 100644 --- a/tests/ui/parser/attribute/attr-dangling-in-mod.stderr +++ b/tests/ui/parser/attribute/attr-dangling-in-mod.stderr @@ -4,5 +4,5 @@ error: expected item after attributes LL | #[foo = "bar"] | ^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.rs b/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.rs index d1950087c..2c402e4c6 100644 --- a/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.rs +++ b/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.rs @@ -84,15 +84,15 @@ fn main() {} #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } } //~^ ERROR inclusive range with no end -//~| ERROR expected one of `=>`, `if`, or `|`, found `#` +//~| ERROR expected one of `,`, `=>`, `if`, `|`, or `}`, found `#` #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } } //~^ ERROR inclusive range with no end -//~| ERROR expected one of `=>`, `if`, or `|`, found `#` +//~| ERROR expected one of `,`, `=>`, `if`, `|`, or `}`, found `#` #[cfg(FALSE)] fn e() { match 0 { 0..=-#[attr] 10 => () } } //~^ ERROR unexpected token: `#` #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } } //~^ ERROR inclusive range with no end -//~| ERROR expected one of `=>`, `if`, or `|`, found `#` +//~| ERROR expected one of `,`, `=>`, `if`, `|`, or `}`, found `#` #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); } //~^ ERROR unexpected token: `#` diff --git a/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.stderr b/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.stderr index e46c59108..a0e95c5c1 100644 --- a/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.stderr +++ b/tests/ui/parser/attribute/attr-stmt-expr-attr-bad.stderr @@ -365,11 +365,11 @@ LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } } | = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) -error: expected one of `=>`, `if`, or `|`, found `#` +error: expected one of `,`, `=>`, `if`, `|`, or `}`, found `#` --> $DIR/attr-stmt-expr-attr-bad.rs:85:38 | LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } } - | ^ expected one of `=>`, `if`, or `|` + | ^ expected one of `,`, `=>`, `if`, `|`, or `}` error[E0586]: inclusive range with no end --> $DIR/attr-stmt-expr-attr-bad.rs:88:35 @@ -379,11 +379,11 @@ LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } } | = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) -error: expected one of `=>`, `if`, or `|`, found `#` +error: expected one of `,`, `=>`, `if`, `|`, or `}`, found `#` --> $DIR/attr-stmt-expr-attr-bad.rs:88:38 | LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } } - | ^ expected one of `=>`, `if`, or `|` + | ^ expected one of `,`, `=>`, `if`, `|`, or `}` error: unexpected token: `#` --> $DIR/attr-stmt-expr-attr-bad.rs:91:39 @@ -399,11 +399,11 @@ LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } } | = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) -error: expected one of `=>`, `if`, or `|`, found `#` +error: expected one of `,`, `=>`, `if`, `|`, or `}`, found `#` --> $DIR/attr-stmt-expr-attr-bad.rs:93:38 | LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } } - | ^ expected one of `=>`, `if`, or `|` + | ^ expected one of `,`, `=>`, `if`, `|`, or `}` error: unexpected token: `#` --> $DIR/attr-stmt-expr-attr-bad.rs:97:34 diff --git a/tests/ui/parser/attribute/attr-with-a-semicolon.stderr b/tests/ui/parser/attribute/attr-with-a-semicolon.stderr index 0de3490b8..b77f30fdb 100644 --- a/tests/ui/parser/attribute/attr-with-a-semicolon.stderr +++ b/tests/ui/parser/attribute/attr-with-a-semicolon.stderr @@ -10,5 +10,5 @@ LL - #[derive(Debug, Clone)]; LL + #[derive(Debug, Clone)] | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/attribute/attr.stderr b/tests/ui/parser/attribute/attr.stderr index 7cd0ac224..2e0b16efb 100644 --- a/tests/ui/parser/attribute/attr.stderr +++ b/tests/ui/parser/attribute/attr.stderr @@ -13,5 +13,5 @@ LL - #![lang = "foo"] LL + #[lang = "foo"] | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/attribute/attribute-with-no-generics-in-parameter-list.stderr b/tests/ui/parser/attribute/attribute-with-no-generics-in-parameter-list.stderr index 4c5964715..3279e4e59 100644 --- a/tests/ui/parser/attribute/attribute-with-no-generics-in-parameter-list.stderr +++ b/tests/ui/parser/attribute/attribute-with-no-generics-in-parameter-list.stderr @@ -4,5 +4,5 @@ error: attribute without generic parameters LL | fn foo<#[attr]>() {} | ^^^^^^^ attributes are only permitted when preceding parameters -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/attribute/attrs-after-extern-mod.stderr b/tests/ui/parser/attribute/attrs-after-extern-mod.stderr index 135d98457..f2bafa54f 100644 --- a/tests/ui/parser/attribute/attrs-after-extern-mod.stderr +++ b/tests/ui/parser/attribute/attrs-after-extern-mod.stderr @@ -8,5 +8,5 @@ LL | #[cfg(stage37)] LL | } | - the item list ends here -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs b/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs new file mode 100644 index 000000000..d97f24a3d --- /dev/null +++ b/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs @@ -0,0 +1,19 @@ +#![feature(stmt_expr_attributes)] + +fn foo() -> String { + #[cfg(feature = "validation")] + [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>() //~ ERROR expected `;`, found `#` + #[cfg(not(feature = "validation"))] + String::new() +} + +fn bar() -> String { + #[attr] + [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>() //~ ERROR expected `;`, found `#` + #[attr] //~ ERROR cannot find attribute `attr` in this scope + String::new() +} + +fn main() { + println!("{}", foo()); +} diff --git a/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.stderr b/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.stderr new file mode 100644 index 000000000..a71253a5e --- /dev/null +++ b/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.stderr @@ -0,0 +1,54 @@ +error: expected `;`, found `#` + --> $DIR/multiple-tail-expr-behind-cfg.rs:5:64 + | +LL | #[cfg(feature = "validation")] + | ------------------------------ only `;` terminated statements or tail expressions are allowed after this attribute +LL | [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>() + | ^ expected `;` here +LL | #[cfg(not(feature = "validation"))] + | - unexpected token + | +help: add `;` here + | +LL | [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>(); + | + +help: alternatively, consider surrounding the expression with a block + | +LL | { [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>() } + | + + +help: it seems like you are trying to provide different expressions depending on `cfg`, consider using `if cfg!(..)` + | +LL ~ if cfg!(feature = "validation") { +LL ~ [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>() +LL ~ } else if cfg!(not(feature = "validation")) { +LL ~ String::new() +LL + } + | + +error: expected `;`, found `#` + --> $DIR/multiple-tail-expr-behind-cfg.rs:12:64 + | +LL | #[attr] + | ------- only `;` terminated statements or tail expressions are allowed after this attribute +LL | [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>() + | ^ expected `;` here +LL | #[attr] + | - unexpected token + | +help: add `;` here + | +LL | [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>(); + | + +help: alternatively, consider surrounding the expression with a block + | +LL | { [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>() } + | + + + +error: cannot find attribute `attr` in this scope + --> $DIR/multiple-tail-expr-behind-cfg.rs:13:7 + | +LL | #[attr] + | ^^^^ + +error: aborting due to 3 previous errors + diff --git a/tests/ui/parser/bad-escape-suggest-raw-string.stderr b/tests/ui/parser/bad-escape-suggest-raw-string.stderr index 45d24bc0f..6dd4ad512 100644 --- a/tests/ui/parser/bad-escape-suggest-raw-string.stderr +++ b/tests/ui/parser/bad-escape-suggest-raw-string.stderr @@ -10,5 +10,5 @@ help: if you meant to write a literal backslash (perhaps escaping in a regular e LL | let bad = r"ab\[c"; | ~~~~~~~~ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/bad-let-as-field.stderr b/tests/ui/parser/bad-let-as-field.stderr index 57def42b1..8568036d0 100644 --- a/tests/ui/parser/bad-let-as-field.stderr +++ b/tests/ui/parser/bad-let-as-field.stderr @@ -11,5 +11,5 @@ help: escape `let` to use it as an identifier LL | r#let: i32, | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/bad-let-else-statement.rs b/tests/ui/parser/bad-let-else-statement.rs new file mode 100644 index 000000000..7b927c89b --- /dev/null +++ b/tests/ui/parser/bad-let-else-statement.rs @@ -0,0 +1,164 @@ +#![feature(inline_const)] +#![feature(yeet_expr)] +#![allow(incomplete_features)] // Necessary for now, while explicit_tail_calls is incomplete +#![feature(explicit_tail_calls)] + +fn a() { + let foo = { + 1 + } else { + //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed + return; + }; +} + +fn b() { + let foo = for i in 1..2 { + break; + } else { + //~^ ERROR `for...else` loops are not supported + return; + }; +} + +fn c() { + let foo = if true { + 1 + } else { + 0 + } else { + //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed + return; + }; +} + +fn d() { + let foo = loop { + break; + } else { + //~^ ERROR loop...else` loops are not supported + return; + }; +} + +fn e() { + let foo = match true { + true => 1, + false => 0 + } else { + //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed + return; + }; +} + +struct X {a: i32} +fn f() { + let foo = X { + a: 1 + } else { + //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed + return; + }; +} + +fn g() { + let foo = while false { + break; + } else { + //~^ ERROR `while...else` loops are not supported + return; + }; +} + +fn h() { + let foo = const { + 1 + } else { + //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed + return; + }; +} + +fn i() { + let foo = &{ + 1 + } else { + //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed + return; + }; +} + +fn j() { + let bar = 0; + let foo = bar = { + 1 + } else { + //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed + return; + }; +} + +fn k() { + let foo = 1 + { + 1 + } else { + //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed + return; + }; +} + +fn l() { + let foo = 1..{ + 1 + } else { + //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed + return; + }; +} + +fn m() { + let foo = return { + () + } else { + //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed + return; + }; +} + +fn n() { + let foo = -{ + 1 + } else { + //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed + return; + }; +} + +fn o() -> Result<(), ()> { + let foo = do yeet { + () + } else { + //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed + return Ok(()); + }; +} + +fn p() { + let foo = become { + () + } else { + //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed + return; + }; +} + +fn q() { + let foo = |x: i32| { + x + } else { + //~^ ERROR right curly brace `}` before `else` in a `let...else` statement not allowed + return; + }; +} + +fn main() {} diff --git a/tests/ui/parser/bad-let-else-statement.stderr b/tests/ui/parser/bad-let-else-statement.stderr new file mode 100644 index 000000000..7cbda25e4 --- /dev/null +++ b/tests/ui/parser/bad-let-else-statement.stderr @@ -0,0 +1,232 @@ +error: right curly brace `}` before `else` in a `let...else` statement not allowed + --> $DIR/bad-let-else-statement.rs:9:5 + | +LL | } else { + | ^ + | +help: wrap the expression in parentheses + | +LL ~ let foo = ({ +LL | 1 +LL ~ }) else { + | + +error: `for...else` loops are not supported + --> $DIR/bad-let-else-statement.rs:18:7 + | +LL | let foo = for i in 1..2 { + | --- `else` is attached to this loop +LL | break; +LL | } else { + | _______^ +LL | | +LL | | return; +LL | | }; + | |_____^ + | + = note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run + +error: right curly brace `}` before `else` in a `let...else` statement not allowed + --> $DIR/bad-let-else-statement.rs:29:5 + | +LL | } else { + | ^ + | +help: wrap the expression in parentheses + | +LL ~ let foo = (if true { +LL | 1 +LL | } else { +LL | 0 +LL ~ }) else { + | + +error: `loop...else` loops are not supported + --> $DIR/bad-let-else-statement.rs:38:7 + | +LL | let foo = loop { + | ---- `else` is attached to this loop +LL | break; +LL | } else { + | _______^ +LL | | +LL | | return; +LL | | }; + | |_____^ + | + = note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run + +error: right curly brace `}` before `else` in a `let...else` statement not allowed + --> $DIR/bad-let-else-statement.rs:48:5 + | +LL | } else { + | ^ + | +help: wrap the expression in parentheses + | +LL ~ let foo = (match true { +LL | true => 1, +LL | false => 0 +LL ~ }) else { + | + +error: right curly brace `}` before `else` in a `let...else` statement not allowed + --> $DIR/bad-let-else-statement.rs:58:5 + | +LL | } else { + | ^ + | +help: wrap the expression in parentheses + | +LL ~ let foo = (X { +LL | a: 1 +LL ~ }) else { + | + +error: `while...else` loops are not supported + --> $DIR/bad-let-else-statement.rs:67:7 + | +LL | let foo = while false { + | ----- `else` is attached to this loop +LL | break; +LL | } else { + | _______^ +LL | | +LL | | return; +LL | | }; + | |_____^ + | + = note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run + +error: right curly brace `}` before `else` in a `let...else` statement not allowed + --> $DIR/bad-let-else-statement.rs:76:5 + | +LL | } else { + | ^ + | +help: wrap the expression in parentheses + | +LL ~ let foo = (const { +LL | 1 +LL ~ }) else { + | + +error: right curly brace `}` before `else` in a `let...else` statement not allowed + --> $DIR/bad-let-else-statement.rs:85:5 + | +LL | } else { + | ^ + | +help: wrap the expression in parentheses + | +LL ~ let foo = &({ +LL | 1 +LL ~ }) else { + | + +error: right curly brace `}` before `else` in a `let...else` statement not allowed + --> $DIR/bad-let-else-statement.rs:95:5 + | +LL | } else { + | ^ + | +help: wrap the expression in parentheses + | +LL ~ let foo = bar = ({ +LL | 1 +LL ~ }) else { + | + +error: right curly brace `}` before `else` in a `let...else` statement not allowed + --> $DIR/bad-let-else-statement.rs:104:5 + | +LL | } else { + | ^ + | +help: wrap the expression in parentheses + | +LL ~ let foo = 1 + ({ +LL | 1 +LL ~ }) else { + | + +error: right curly brace `}` before `else` in a `let...else` statement not allowed + --> $DIR/bad-let-else-statement.rs:113:5 + | +LL | } else { + | ^ + | +help: wrap the expression in parentheses + | +LL ~ let foo = 1..({ +LL | 1 +LL ~ }) else { + | + +error: right curly brace `}` before `else` in a `let...else` statement not allowed + --> $DIR/bad-let-else-statement.rs:122:5 + | +LL | } else { + | ^ + | +help: wrap the expression in parentheses + | +LL ~ let foo = return ({ +LL | () +LL ~ }) else { + | + +error: right curly brace `}` before `else` in a `let...else` statement not allowed + --> $DIR/bad-let-else-statement.rs:131:5 + | +LL | } else { + | ^ + | +help: wrap the expression in parentheses + | +LL ~ let foo = -({ +LL | 1 +LL ~ }) else { + | + +error: right curly brace `}` before `else` in a `let...else` statement not allowed + --> $DIR/bad-let-else-statement.rs:140:5 + | +LL | } else { + | ^ + | +help: wrap the expression in parentheses + | +LL ~ let foo = do yeet ({ +LL | () +LL ~ }) else { + | + +error: right curly brace `}` before `else` in a `let...else` statement not allowed + --> $DIR/bad-let-else-statement.rs:149:5 + | +LL | } else { + | ^ + | +help: wrap the expression in parentheses + | +LL ~ let foo = become ({ +LL | () +LL ~ }) else { + | + +error: right curly brace `}` before `else` in a `let...else` statement not allowed + --> $DIR/bad-let-else-statement.rs:158:5 + | +LL | } else { + | ^ + | +help: wrap the expression in parentheses + | +LL ~ let foo = |x: i32| ({ +LL | x +LL ~ }) else { + | + +error: aborting due to 17 previous errors + diff --git a/tests/ui/parser/bad-lit-suffixes.rs b/tests/ui/parser/bad-lit-suffixes.rs index 8cb9ef7e0..c614f4938 100644 --- a/tests/ui/parser/bad-lit-suffixes.rs +++ b/tests/ui/parser/bad-lit-suffixes.rs @@ -28,11 +28,12 @@ fn main() { } #[rustc_dummy = "string"suffix] -//~^ ERROR unexpected expression: `"string"suffix` +//~^ ERROR suffixes on string literals are invalid fn f() {} #[must_use = "string"suffix] -//~^ ERROR unexpected expression: `"string"suffix` +//~^ ERROR suffixes on string literals are invalid +//~| ERROR malformed `must_use` attribute input fn g() {} #[link(name = "string"suffix)] diff --git a/tests/ui/parser/bad-lit-suffixes.stderr b/tests/ui/parser/bad-lit-suffixes.stderr index 756f99ab1..b5dacdf7d 100644 --- a/tests/ui/parser/bad-lit-suffixes.stderr +++ b/tests/ui/parser/bad-lit-suffixes.stderr @@ -10,26 +10,39 @@ error: suffixes on string literals are invalid LL | "C"suffix | ^^^^^^^^^ invalid suffix `suffix` -error: unexpected expression: `"string"suffix` +error: suffixes on string literals are invalid --> $DIR/bad-lit-suffixes.rs:30:17 | LL | #[rustc_dummy = "string"suffix] - | ^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^ invalid suffix `suffix` -error: unexpected expression: `"string"suffix` +error: suffixes on string literals are invalid --> $DIR/bad-lit-suffixes.rs:34:14 | LL | #[must_use = "string"suffix] - | ^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^ invalid suffix `suffix` + +error: malformed `must_use` attribute input + --> $DIR/bad-lit-suffixes.rs:34:1 + | +LL | #[must_use = "string"suffix] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +help: the following are the possible correct uses + | +LL | #[must_use = "reason"] + | +LL | #[must_use] + | error: suffixes on string literals are invalid - --> $DIR/bad-lit-suffixes.rs:38:15 + --> $DIR/bad-lit-suffixes.rs:39:15 | LL | #[link(name = "string"suffix)] | ^^^^^^^^^^^^^^ invalid suffix `suffix` error: invalid suffix `suffix` for number literal - --> $DIR/bad-lit-suffixes.rs:42:41 + --> $DIR/bad-lit-suffixes.rs:43:41 | LL | #[rustc_layout_scalar_valid_range_start(0suffix)] | ^^^^^^^ invalid suffix `suffix` @@ -136,5 +149,5 @@ LL | 1.0e10suffix; | = help: valid suffixes are `f32` and `f64` -error: aborting due to 20 previous errors +error: aborting due to 21 previous errors diff --git a/tests/ui/parser/bad-match.stderr b/tests/ui/parser/bad-match.stderr index 13784c409..8e7878c2b 100644 --- a/tests/ui/parser/bad-match.stderr +++ b/tests/ui/parser/bad-match.stderr @@ -4,5 +4,5 @@ error: expected one of `:`, `;`, `=`, `@`, or `|`, found `x` LL | let isize x = 5; | ^ expected one of `:`, `;`, `=`, `@`, or `|` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/bad-name.stderr b/tests/ui/parser/bad-name.stderr index a36b67794..e133d4e48 100644 --- a/tests/ui/parser/bad-name.stderr +++ b/tests/ui/parser/bad-name.stderr @@ -4,5 +4,5 @@ error: expected one of `:`, `;`, `=`, `@`, or `|`, found `.` LL | let x.y::<isize>.z foo; | ^ expected one of `:`, `;`, `=`, `@`, or `|` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/bad-pointer-type.stderr b/tests/ui/parser/bad-pointer-type.stderr index b7225ca88..f409d4d99 100644 --- a/tests/ui/parser/bad-pointer-type.stderr +++ b/tests/ui/parser/bad-pointer-type.stderr @@ -6,10 +6,10 @@ LL | fn foo(_: *()) { | help: add `mut` or `const` here | -LL | fn foo(_: *const ()) { - | +++++ LL | fn foo(_: *mut ()) { | +++ +LL | fn foo(_: *const ()) { + | +++++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/bad-struct-following-where.stderr b/tests/ui/parser/bad-struct-following-where.stderr index bb79776dc..f27efc95f 100644 --- a/tests/ui/parser/bad-struct-following-where.stderr +++ b/tests/ui/parser/bad-struct-following-where.stderr @@ -4,5 +4,5 @@ error: expected `{` after struct name, found `!` LL | struct A where T: Sized ! | ^ expected `{` after struct name -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/bad-value-ident-false.stderr b/tests/ui/parser/bad-value-ident-false.stderr index 30c05ecf3..971219496 100644 --- a/tests/ui/parser/bad-value-ident-false.stderr +++ b/tests/ui/parser/bad-value-ident-false.stderr @@ -9,5 +9,5 @@ help: escape `false` to use it as an identifier LL | fn r#false() { } | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/bad-value-ident-true.stderr b/tests/ui/parser/bad-value-ident-true.stderr index 74137fa70..b7b73e5f8 100644 --- a/tests/ui/parser/bad-value-ident-true.stderr +++ b/tests/ui/parser/bad-value-ident-true.stderr @@ -9,5 +9,5 @@ help: escape `true` to use it as an identifier LL | fn r#true() { } | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/better-expected.stderr b/tests/ui/parser/better-expected.stderr index 21bf8d19a..6cb9a4960 100644 --- a/tests/ui/parser/better-expected.stderr +++ b/tests/ui/parser/better-expected.stderr @@ -6,5 +6,5 @@ LL | let x: [isize 3]; | | | while parsing the type for `x` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/bind-struct-early-modifiers.stderr b/tests/ui/parser/bind-struct-early-modifiers.stderr index b35762a88..6b366a995 100644 --- a/tests/ui/parser/bind-struct-early-modifiers.stderr +++ b/tests/ui/parser/bind-struct-early-modifiers.stderr @@ -6,5 +6,5 @@ LL | Foo { ref x: ref x } => {}, | | | while parsing the fields for this pattern -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/bound-single-question-mark.stderr b/tests/ui/parser/bound-single-question-mark.stderr index 82937a517..f339c2022 100644 --- a/tests/ui/parser/bound-single-question-mark.stderr +++ b/tests/ui/parser/bound-single-question-mark.stderr @@ -4,5 +4,5 @@ error: expected identifier, found `>` LL | fn f<T: ?>() {} | ^ expected identifier -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/bounds-lifetime-1.stderr b/tests/ui/parser/bounds-lifetime-1.stderr index 000e84f63..101704f64 100644 --- a/tests/ui/parser/bounds-lifetime-1.stderr +++ b/tests/ui/parser/bounds-lifetime-1.stderr @@ -4,5 +4,5 @@ error: expected one of `,`, `:`, or `>`, found `'b` LL | type A = for<'a 'b> fn(); | ^^ expected one of `,`, `:`, or `>` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/bounds-lifetime-2.stderr b/tests/ui/parser/bounds-lifetime-2.stderr index dd3e69c11..f39cc604e 100644 --- a/tests/ui/parser/bounds-lifetime-2.stderr +++ b/tests/ui/parser/bounds-lifetime-2.stderr @@ -4,5 +4,5 @@ error: expected one of `,`, `:`, or `>`, found `+` LL | type A = for<'a + 'b> fn(); | ^ expected one of `,`, `:`, or `>` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/bounds-lifetime-where-1.stderr b/tests/ui/parser/bounds-lifetime-where-1.stderr index b6bd86693..f79b4fa03 100644 --- a/tests/ui/parser/bounds-lifetime-where-1.stderr +++ b/tests/ui/parser/bounds-lifetime-where-1.stderr @@ -4,5 +4,5 @@ error: expected `:`, found `;` LL | type A where 'a; | ^ expected `:` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/bounds-lifetime-where.stderr b/tests/ui/parser/bounds-lifetime-where.stderr index 785a1fb67..9dd963afc 100644 --- a/tests/ui/parser/bounds-lifetime-where.stderr +++ b/tests/ui/parser/bounds-lifetime-where.stderr @@ -4,5 +4,5 @@ error: expected one of `;`, `=`, `where`, lifetime, or type, found `,` LL | type A where , = u8; | ^ expected one of `;`, `=`, `where`, lifetime, or type -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/bounds-lifetime.stderr b/tests/ui/parser/bounds-lifetime.stderr index e47a21d89..26a3e7863 100644 --- a/tests/ui/parser/bounds-lifetime.stderr +++ b/tests/ui/parser/bounds-lifetime.stderr @@ -4,5 +4,5 @@ error: expected one of `#`, `>`, `const`, identifier, or lifetime, found `,` LL | type A = for<,> fn(); | ^ expected one of `#`, `>`, `const`, identifier, or lifetime -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/bounds-type-where.stderr b/tests/ui/parser/bounds-type-where.stderr index 5636ee75c..709d31430 100644 --- a/tests/ui/parser/bounds-type-where.stderr +++ b/tests/ui/parser/bounds-type-where.stderr @@ -4,5 +4,5 @@ error: expected one of `!`, `(`, `+`, `::`, `:`, `<`, `==`, or `=`, found `,` LL | type A where T, = u8; | ^ expected one of 8 possible tokens -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/brace-in-let-chain.rs b/tests/ui/parser/brace-in-let-chain.rs new file mode 100644 index 000000000..1f34c73a2 --- /dev/null +++ b/tests/ui/parser/brace-in-let-chain.rs @@ -0,0 +1,58 @@ +// issue #117766 + +#![feature(let_chains)] +fn main() { + if let () = () + && let () = () { //~ERROR: found a `{` in the middle of a let-chain + && let () = () + { + } +} + +fn quux() { + while let () = () + && let () = () { //~ERROR: found a `{` in the middle of a let-chain + && let () = () + { + } +} + +fn foobar() { + while false {} + { + && let () = () +} + +fn fubar() { + while false { + { + && let () = () + } +} + +fn qux() { + let foo = false; + match foo { + _ if foo => { + && let () = () + _ => {} + } +} + +fn foo() { + { + && let () = () +} + +fn bar() { + if false {} + { + && let () = () +} + +fn baz() { + if false { + { + && let () = () + } +} //~ERROR: this file contains an unclosed delimiter diff --git a/tests/ui/parser/brace-in-let-chain.stderr b/tests/ui/parser/brace-in-let-chain.stderr new file mode 100644 index 000000000..7182d86d0 --- /dev/null +++ b/tests/ui/parser/brace-in-let-chain.stderr @@ -0,0 +1,65 @@ +error: this file contains an unclosed delimiter + --> $DIR/brace-in-let-chain.rs:58:54 + | +LL | fn main() { + | - unclosed delimiter +... +LL | fn quux() { + | - unclosed delimiter +... +LL | fn foobar() { + | - unclosed delimiter +... +LL | fn fubar() { + | - unclosed delimiter +... +LL | fn qux() { + | - unclosed delimiter +... +LL | fn foo() { + | - unclosed delimiter +... +LL | fn bar() { + | - unclosed delimiter +... +LL | fn baz() { + | - unclosed delimiter +LL | if false { +LL | { + | - this delimiter might not be properly closed... +LL | && let () = () +LL | } + | - ...as it matches this but it has different indentation +LL | } + | ^ + +error: found a `{` in the middle of a let-chain + --> $DIR/brace-in-let-chain.rs:14:24 + | +LL | && let () = () { + | ^ +LL | && let () = () + | ------ you might have meant to continue the let-chain here + | +help: consider removing this brace to parse the `let` as part of the same chain + | +LL - && let () = () { +LL + && let () = () + | + +error: found a `{` in the middle of a let-chain + --> $DIR/brace-in-let-chain.rs:6:24 + | +LL | && let () = () { + | ^ +LL | && let () = () + | ------ you might have meant to continue the let-chain here + | +help: consider removing this brace to parse the `let` as part of the same chain + | +LL - && let () = () { +LL + && let () = () + | + +error: aborting due to 3 previous errors + diff --git a/tests/ui/parser/can-begin-expr-check.stderr b/tests/ui/parser/can-begin-expr-check.stderr index 9569ababa..247009be0 100644 --- a/tests/ui/parser/can-begin-expr-check.stderr +++ b/tests/ui/parser/can-begin-expr-check.stderr @@ -4,5 +4,5 @@ error: expected one of `;`, `}`, or an operator, found keyword `enum` LL | return enum; | ^^^^ expected one of `;`, `}`, or an operator -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/char/whitespace-character-literal.stderr b/tests/ui/parser/char/whitespace-character-literal.stderr index d73de41a8..3bd048f8f 100644 --- a/tests/ui/parser/char/whitespace-character-literal.stderr +++ b/tests/ui/parser/char/whitespace-character-literal.stderr @@ -12,5 +12,5 @@ note: there are non-printing characters, the full sequence is `\u{200a}x\u{200b} LL | let _hair_space_around = ' x​'; | ^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/class-implements-bad-trait.stderr b/tests/ui/parser/class-implements-bad-trait.stderr index 3a4dea95d..5290e3594 100644 --- a/tests/ui/parser/class-implements-bad-trait.stderr +++ b/tests/ui/parser/class-implements-bad-trait.stderr @@ -4,5 +4,5 @@ error: expected one of `!` or `::`, found `cat` LL | class cat : nonexistent { | ^^^ expected one of `!` or `::` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/closure-return-syntax.stderr b/tests/ui/parser/closure-return-syntax.stderr index 3d16a2067..eb8428854 100644 --- a/tests/ui/parser/closure-return-syntax.stderr +++ b/tests/ui/parser/closure-return-syntax.stderr @@ -9,5 +9,5 @@ help: try placing this code inside a block LL | let x = || -> i32 { 22 }; | + + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/column-offset-1-based.stderr b/tests/ui/parser/column-offset-1-based.stderr index 766d72a0a..d837466d9 100644 --- a/tests/ui/parser/column-offset-1-based.stderr +++ b/tests/ui/parser/column-offset-1-based.stderr @@ -4,5 +4,5 @@ error: expected one of `!` or `[`, found `<eof>` LL | # | ^ expected one of `!` or `[` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/deep-unmatched-angle-brackets.stderr b/tests/ui/parser/deep-unmatched-angle-brackets.stderr index 1f2850374..7c9033f2f 100644 --- a/tests/ui/parser/deep-unmatched-angle-brackets.stderr +++ b/tests/ui/parser/deep-unmatched-angle-brackets.stderr @@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here LL | <f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<>>(); | + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/trait-item-with-defaultness-fail-semantic.rs b/tests/ui/parser/defaultness-invalid-places-fail-semantic.rs index f2d97b7ba..bff53f66e 100644 --- a/tests/ui/parser/trait-item-with-defaultness-fail-semantic.rs +++ b/tests/ui/parser/defaultness-invalid-places-fail-semantic.rs @@ -10,3 +10,7 @@ trait X { default fn f1(); //~ ERROR `default` is only allowed on items in trait impls default fn f2() {} //~ ERROR `default` is only allowed on items in trait impls } + +default const E: u8 = 0; //~ ERROR `default` is only allowed on items in trait impls +default type F = (); //~ ERROR `default` is only allowed on items in trait impls +default fn h() {} //~ ERROR `default` is only allowed on items in trait impls diff --git a/tests/ui/parser/trait-item-with-defaultness-fail-semantic.stderr b/tests/ui/parser/defaultness-invalid-places-fail-semantic.stderr index be858cd65..41fad3a5d 100644 --- a/tests/ui/parser/trait-item-with-defaultness-fail-semantic.stderr +++ b/tests/ui/parser/defaultness-invalid-places-fail-semantic.stderr @@ -1,5 +1,5 @@ error: `default` is only allowed on items in trait impls - --> $DIR/trait-item-with-defaultness-fail-semantic.rs:6:5 + --> $DIR/defaultness-invalid-places-fail-semantic.rs:6:5 | LL | default const A: u8; | -------^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | default const A: u8; | `default` because of this error: `default` is only allowed on items in trait impls - --> $DIR/trait-item-with-defaultness-fail-semantic.rs:7:5 + --> $DIR/defaultness-invalid-places-fail-semantic.rs:7:5 | LL | default const B: u8 = 0; | -------^^^^^^^^^^^^^^^^^ @@ -15,7 +15,7 @@ LL | default const B: u8 = 0; | `default` because of this error: `default` is only allowed on items in trait impls - --> $DIR/trait-item-with-defaultness-fail-semantic.rs:8:5 + --> $DIR/defaultness-invalid-places-fail-semantic.rs:8:5 | LL | default type D; | -------^^^^^^^^ @@ -23,7 +23,7 @@ LL | default type D; | `default` because of this error: `default` is only allowed on items in trait impls - --> $DIR/trait-item-with-defaultness-fail-semantic.rs:9:5 + --> $DIR/defaultness-invalid-places-fail-semantic.rs:9:5 | LL | default type C: Ord; | -------^^^^^^^^^^^^^ @@ -31,7 +31,7 @@ LL | default type C: Ord; | `default` because of this error: `default` is only allowed on items in trait impls - --> $DIR/trait-item-with-defaultness-fail-semantic.rs:10:5 + --> $DIR/defaultness-invalid-places-fail-semantic.rs:10:5 | LL | default fn f1(); | -------^^^^^^^^^ @@ -39,15 +39,39 @@ LL | default fn f1(); | `default` because of this error: `default` is only allowed on items in trait impls - --> $DIR/trait-item-with-defaultness-fail-semantic.rs:11:5 + --> $DIR/defaultness-invalid-places-fail-semantic.rs:11:5 | LL | default fn f2() {} | -------^^^^^^^^ | | | `default` because of this +error: `default` is only allowed on items in trait impls + --> $DIR/defaultness-invalid-places-fail-semantic.rs:14:1 + | +LL | default const E: u8 = 0; + | -------^^^^^^^^^^^^^^^^^ + | | + | `default` because of this + +error: `default` is only allowed on items in trait impls + --> $DIR/defaultness-invalid-places-fail-semantic.rs:15:1 + | +LL | default type F = (); + | -------^^^^^^^^^^^^^ + | | + | `default` because of this + +error: `default` is only allowed on items in trait impls + --> $DIR/defaultness-invalid-places-fail-semantic.rs:16:1 + | +LL | default fn h() {} + | -------^^^^^^^ + | | + | `default` because of this + warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/trait-item-with-defaultness-fail-semantic.rs:1:12 + --> $DIR/defaultness-invalid-places-fail-semantic.rs:1:12 | LL | #![feature(specialization)] | ^^^^^^^^^^^^^^ @@ -56,5 +80,5 @@ LL | #![feature(specialization)] = help: consider using `min_specialization` instead, which is more stable and complete = note: `#[warn(incomplete_features)]` on by default -error: aborting due to 6 previous errors; 1 warning emitted +error: aborting due to 9 previous errors; 1 warning emitted diff --git a/tests/ui/parser/deli-ident-issue-1.stderr b/tests/ui/parser/deli-ident-issue-1.stderr index eb5073e14..78f5d7b63 100644 --- a/tests/ui/parser/deli-ident-issue-1.stderr +++ b/tests/ui/parser/deli-ident-issue-1.stderr @@ -13,5 +13,5 @@ LL | } LL | fn main() { } | ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/diff-markers/enum-2.stderr b/tests/ui/parser/diff-markers/enum-2.stderr index 63da5c2a6..20e551c2f 100644 --- a/tests/ui/parser/diff-markers/enum-2.stderr +++ b/tests/ui/parser/diff-markers/enum-2.stderr @@ -17,5 +17,5 @@ LL | >>>>>>> branch = help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased = note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/diff-markers/enum.stderr b/tests/ui/parser/diff-markers/enum.stderr index abbf3fb41..be94331dc 100644 --- a/tests/ui/parser/diff-markers/enum.stderr +++ b/tests/ui/parser/diff-markers/enum.stderr @@ -14,5 +14,5 @@ LL | >>>>>>> branch = help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased = note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/diff-markers/fn-arg.stderr b/tests/ui/parser/diff-markers/fn-arg.stderr index 933a20641..aabcb826c 100644 --- a/tests/ui/parser/diff-markers/fn-arg.stderr +++ b/tests/ui/parser/diff-markers/fn-arg.stderr @@ -14,5 +14,5 @@ LL | >>>>>>> branch = help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased = note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/diff-markers/item-with-attr.stderr b/tests/ui/parser/diff-markers/item-with-attr.stderr index 850e2368e..eefb2792e 100644 --- a/tests/ui/parser/diff-markers/item-with-attr.stderr +++ b/tests/ui/parser/diff-markers/item-with-attr.stderr @@ -14,5 +14,5 @@ LL | >>>>>>> branch = help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased = note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/diff-markers/item.stderr b/tests/ui/parser/diff-markers/item.stderr index 9ab3631a6..a3092ebfc 100644 --- a/tests/ui/parser/diff-markers/item.stderr +++ b/tests/ui/parser/diff-markers/item.stderr @@ -14,5 +14,5 @@ LL | >>>>>>> branch = help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased = note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/diff-markers/statement.stderr b/tests/ui/parser/diff-markers/statement.stderr index 7ca2495b8..c6c6cae87 100644 --- a/tests/ui/parser/diff-markers/statement.stderr +++ b/tests/ui/parser/diff-markers/statement.stderr @@ -14,5 +14,5 @@ LL | >>>>>>> branch = help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased = note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/diff-markers/struct-expr.stderr b/tests/ui/parser/diff-markers/struct-expr.stderr index d70476a98..bdea8c841 100644 --- a/tests/ui/parser/diff-markers/struct-expr.stderr +++ b/tests/ui/parser/diff-markers/struct-expr.stderr @@ -14,5 +14,5 @@ LL | >>>>>>> branch = help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased = note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/diff-markers/struct.stderr b/tests/ui/parser/diff-markers/struct.stderr index cc0b3da66..749941290 100644 --- a/tests/ui/parser/diff-markers/struct.stderr +++ b/tests/ui/parser/diff-markers/struct.stderr @@ -14,5 +14,5 @@ LL | >>>>>>> branch = help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased = note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/diff-markers/trait-item.stderr b/tests/ui/parser/diff-markers/trait-item.stderr index cdc19f8e0..f01bbe8ba 100644 --- a/tests/ui/parser/diff-markers/trait-item.stderr +++ b/tests/ui/parser/diff-markers/trait-item.stderr @@ -14,5 +14,5 @@ LL | >>>>>>> branch = help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased = note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/diff-markers/tuple-struct.stderr b/tests/ui/parser/diff-markers/tuple-struct.stderr index d673db898..8dae123c9 100644 --- a/tests/ui/parser/diff-markers/tuple-struct.stderr +++ b/tests/ui/parser/diff-markers/tuple-struct.stderr @@ -14,5 +14,5 @@ LL | >>>>>>> branch = help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased = note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/diff-markers/unclosed-delims-in-macro.stderr b/tests/ui/parser/diff-markers/unclosed-delims-in-macro.stderr index e0b6f1b5e..6995b8e6f 100644 --- a/tests/ui/parser/diff-markers/unclosed-delims-in-macro.stderr +++ b/tests/ui/parser/diff-markers/unclosed-delims-in-macro.stderr @@ -14,5 +14,5 @@ LL | >>>>>>> 7a4f13c blah blah blah = help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased = note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/diff-markers/unclosed-delims.stderr b/tests/ui/parser/diff-markers/unclosed-delims.stderr index 67199179b..d4636150e 100644 --- a/tests/ui/parser/diff-markers/unclosed-delims.stderr +++ b/tests/ui/parser/diff-markers/unclosed-delims.stderr @@ -14,5 +14,5 @@ LL | >>>>>>> 7a4f13c blah blah blah = help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased = note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/diff-markers/use-statement.stderr b/tests/ui/parser/diff-markers/use-statement.stderr index 12e6f57dd..6d376166a 100644 --- a/tests/ui/parser/diff-markers/use-statement.stderr +++ b/tests/ui/parser/diff-markers/use-statement.stderr @@ -14,5 +14,5 @@ LL | >>>>>>> branch = help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased = note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/do-not-suggest-semicolon-before-array.stderr b/tests/ui/parser/do-not-suggest-semicolon-before-array.stderr index 7b43c7700..0227439ce 100644 --- a/tests/ui/parser/do-not-suggest-semicolon-before-array.stderr +++ b/tests/ui/parser/do-not-suggest-semicolon-before-array.stderr @@ -6,5 +6,5 @@ LL | [1, 3) | | | unclosed delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/do-not-suggest-semicolon-between-macro-without-exclamation-mark-and-array.stderr b/tests/ui/parser/do-not-suggest-semicolon-between-macro-without-exclamation-mark-and-array.stderr index 2fe6a28ee..2796312f4 100644 --- a/tests/ui/parser/do-not-suggest-semicolon-between-macro-without-exclamation-mark-and-array.stderr +++ b/tests/ui/parser/do-not-suggest-semicolon-between-macro-without-exclamation-mark-and-array.stderr @@ -4,5 +4,5 @@ error: expected one of `.`, `?`, `]`, or an operator, found `,` LL | let _x = vec[1, 2, 3]; | ^ expected one of `.`, `?`, `]`, or an operator -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/doc-before-attr.stderr b/tests/ui/parser/doc-before-attr.stderr index 14fd01af2..0298b9b60 100644 --- a/tests/ui/parser/doc-before-attr.stderr +++ b/tests/ui/parser/doc-before-attr.stderr @@ -6,5 +6,5 @@ LL | /// hi LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/doc-before-eof.stderr b/tests/ui/parser/doc-before-eof.stderr index 827566267..e41d02f0e 100644 --- a/tests/ui/parser/doc-before-eof.stderr +++ b/tests/ui/parser/doc-before-eof.stderr @@ -4,5 +4,5 @@ error: expected item after doc comment LL | /// hi | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment doesn't document anything -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/doc-before-extern-rbrace.stderr b/tests/ui/parser/doc-before-extern-rbrace.stderr index 8fa12ec26..4d952e294 100644 --- a/tests/ui/parser/doc-before-extern-rbrace.stderr +++ b/tests/ui/parser/doc-before-extern-rbrace.stderr @@ -6,6 +6,6 @@ LL | /// hi | = help: doc comments must come before what they document, if a comment was intended use `//` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0584`. diff --git a/tests/ui/parser/doc-before-fn-rbrace.stderr b/tests/ui/parser/doc-before-fn-rbrace.stderr index 6ea68e42b..bbe6b7144 100644 --- a/tests/ui/parser/doc-before-fn-rbrace.stderr +++ b/tests/ui/parser/doc-before-fn-rbrace.stderr @@ -6,6 +6,6 @@ LL | /// document | = help: doc comments must come before what they document, if a comment was intended use `//` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0585`. diff --git a/tests/ui/parser/doc-before-identifier.stderr b/tests/ui/parser/doc-before-identifier.stderr index 940d293b6..501b05c5a 100644 --- a/tests/ui/parser/doc-before-identifier.stderr +++ b/tests/ui/parser/doc-before-identifier.stderr @@ -4,5 +4,5 @@ error: expected identifier, found doc comment `/// document` LL | fn /// document | ^^^^^^^^^^^^ expected identifier, found doc comment -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/doc-before-mod-rbrace.stderr b/tests/ui/parser/doc-before-mod-rbrace.stderr index d5749c66c..00aa40b62 100644 --- a/tests/ui/parser/doc-before-mod-rbrace.stderr +++ b/tests/ui/parser/doc-before-mod-rbrace.stderr @@ -4,5 +4,5 @@ error: expected item after doc comment LL | /// document | ^^^^^^^^^^^^ this doc comment doesn't document anything -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/doc-before-rbrace.stderr b/tests/ui/parser/doc-before-rbrace.stderr index 4d4741dfe..3c4ea5375 100644 --- a/tests/ui/parser/doc-before-rbrace.stderr +++ b/tests/ui/parser/doc-before-rbrace.stderr @@ -6,6 +6,6 @@ LL | println!("Hi"); /// hi | = help: doc comments must come before what they document, if a comment was intended use `//` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0585`. diff --git a/tests/ui/parser/doc-before-semi.stderr b/tests/ui/parser/doc-before-semi.stderr index a879e13ff..f3454d30d 100644 --- a/tests/ui/parser/doc-before-semi.stderr +++ b/tests/ui/parser/doc-before-semi.stderr @@ -6,6 +6,6 @@ LL | /// hi | = help: doc comments must come before what they document, if a comment was intended use `//` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0585`. diff --git a/tests/ui/parser/doc-before-struct-rbrace-1.stderr b/tests/ui/parser/doc-before-struct-rbrace-1.stderr index 94934f734..62a27740f 100644 --- a/tests/ui/parser/doc-before-struct-rbrace-1.stderr +++ b/tests/ui/parser/doc-before-struct-rbrace-1.stderr @@ -9,6 +9,6 @@ LL | /// document | = help: doc comments must come before what they document, if a comment was intended use `//` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0585`. diff --git a/tests/ui/parser/doc-before-struct-rbrace-2.stderr b/tests/ui/parser/doc-before-struct-rbrace-2.stderr index 6b5c8c1f8..66c6ce894 100644 --- a/tests/ui/parser/doc-before-struct-rbrace-2.stderr +++ b/tests/ui/parser/doc-before-struct-rbrace-2.stderr @@ -6,6 +6,6 @@ LL | a: u8 /// document | = help: doc comments must come before what they document, if a comment was intended use `//` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0585`. diff --git a/tests/ui/parser/doc-inside-trait-item.stderr b/tests/ui/parser/doc-inside-trait-item.stderr index 900124adc..df1ebc110 100644 --- a/tests/ui/parser/doc-inside-trait-item.stderr +++ b/tests/ui/parser/doc-inside-trait-item.stderr @@ -6,6 +6,6 @@ LL | /// empty doc | = help: doc comments must come before what they document, if a comment was intended use `//` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0584`. diff --git a/tests/ui/parser/dotdotdot-expr.stderr b/tests/ui/parser/dotdotdot-expr.stderr index e7203f24d..208c04bd3 100644 --- a/tests/ui/parser/dotdotdot-expr.stderr +++ b/tests/ui/parser/dotdotdot-expr.stderr @@ -13,5 +13,5 @@ help: or `..=` for an inclusive range LL | let _redemptive = 1..=21; | ~~~ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/double-pointer.stderr b/tests/ui/parser/double-pointer.stderr index 28037f932..25403c5b0 100644 --- a/tests/ui/parser/double-pointer.stderr +++ b/tests/ui/parser/double-pointer.stderr @@ -6,10 +6,10 @@ LL | let dptr: **const i32 = &ptr; | help: add `mut` or `const` here | -LL | let dptr: *const *const i32 = &ptr; - | +++++ LL | let dptr: *mut *const i32 = &ptr; | +++ +LL | let dptr: *const *const i32 = &ptr; + | +++++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/duplicate-visibility.stderr b/tests/ui/parser/duplicate-visibility.stderr index 8ecebf01f..b578b1fe2 100644 --- a/tests/ui/parser/duplicate-visibility.stderr +++ b/tests/ui/parser/duplicate-visibility.stderr @@ -18,5 +18,5 @@ note: explicit visibility first seen here LL | pub pub fn foo(); | ^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/empty-impl-semicolon.stderr b/tests/ui/parser/empty-impl-semicolon.stderr index 6ed309eba..cb15c36e6 100644 --- a/tests/ui/parser/empty-impl-semicolon.stderr +++ b/tests/ui/parser/empty-impl-semicolon.stderr @@ -6,5 +6,5 @@ LL | impl Foo; | = help: try using `{}` instead -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/extern-crate-unexpected-token.stderr b/tests/ui/parser/extern-crate-unexpected-token.stderr index e9d287ac0..f83bb3e3e 100644 --- a/tests/ui/parser/extern-crate-unexpected-token.stderr +++ b/tests/ui/parser/extern-crate-unexpected-token.stderr @@ -4,5 +4,5 @@ error: expected one of `crate` or `{`, found `crte` LL | extern crte foo; | ^^^^ expected one of `crate` or `{` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/extern-expected-fn-or-brace.stderr b/tests/ui/parser/extern-expected-fn-or-brace.stderr index 258a2c268..c2200e037 100644 --- a/tests/ui/parser/extern-expected-fn-or-brace.stderr +++ b/tests/ui/parser/extern-expected-fn-or-brace.stderr @@ -4,5 +4,5 @@ error: expected `{`, found keyword `mod` LL | extern "C" mod foo; | ^^^ expected `{` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/extern-foreign-crate.stderr b/tests/ui/parser/extern-foreign-crate.stderr index eb75c0fc9..10c58aeb5 100644 --- a/tests/ui/parser/extern-foreign-crate.stderr +++ b/tests/ui/parser/extern-foreign-crate.stderr @@ -4,5 +4,5 @@ error: expected one of `;` or `as`, found `{` LL | extern crate foo {} | ^ expected one of `;` or `as` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/extern-no-fn.stderr b/tests/ui/parser/extern-no-fn.stderr index d9183d564..2e434afb2 100644 --- a/tests/ui/parser/extern-no-fn.stderr +++ b/tests/ui/parser/extern-no-fn.stderr @@ -8,5 +8,5 @@ LL | f(); LL | } | - the item list ends here -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/float-field-interpolated.rs b/tests/ui/parser/float-field-interpolated.rs index a30532035..990f2926d 100644 --- a/tests/ui/parser/float-field-interpolated.rs +++ b/tests/ui/parser/float-field-interpolated.rs @@ -6,9 +6,9 @@ macro_rules! generate_field_accesses { s.$a; // OK { s.$b; } //~ ERROR unexpected token: `1.1` - //~| ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `1.1` + //~| ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found literal `1.1` { s.$c; } //~ ERROR unexpected token: `1.1` - //~| ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `1.1` + //~| ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found expression `1.1` }; } diff --git a/tests/ui/parser/float-field-interpolated.stderr b/tests/ui/parser/float-field-interpolated.stderr index 664adb358..2a1a4926c 100644 --- a/tests/ui/parser/float-field-interpolated.stderr +++ b/tests/ui/parser/float-field-interpolated.stderr @@ -9,7 +9,7 @@ LL | generate_field_accesses!(1.1, 1.1, 1.1); | = note: this error originates in the macro `generate_field_accesses` (in Nightly builds, run with -Z macro-backtrace for more info) -error: expected one of `.`, `;`, `?`, `}`, or an operator, found `1.1` +error: expected one of `.`, `;`, `?`, `}`, or an operator, found literal `1.1` --> $DIR/float-field-interpolated.rs:8:13 | LL | { s.$b; } @@ -31,7 +31,7 @@ LL | generate_field_accesses!(1.1, 1.1, 1.1); | = note: this error originates in the macro `generate_field_accesses` (in Nightly builds, run with -Z macro-backtrace for more info) -error: expected one of `.`, `;`, `?`, `}`, or an operator, found `1.1` +error: expected one of `.`, `;`, `?`, `}`, or an operator, found expression `1.1` --> $DIR/float-field-interpolated.rs:10:13 | LL | { s.$c; } diff --git a/tests/ui/parser/float-field.stderr b/tests/ui/parser/float-field.stderr index 7090efc50..d67d270ef 100644 --- a/tests/ui/parser/float-field.stderr +++ b/tests/ui/parser/float-field.stderr @@ -274,7 +274,7 @@ error[E0609]: no field `1e1` on type `(u8, u8)` --> $DIR/float-field.rs:9:9 | LL | s.1.1e1; - | ^^^ + | ^^^ unknown field error[E0609]: no field `0x1e1` on type `S` --> $DIR/float-field.rs:24:7 @@ -336,13 +336,13 @@ error[E0609]: no field `f32` on type `(u8, u8)` --> $DIR/float-field.rs:44:9 | LL | s.1.f32; - | ^^^ + | ^^^ unknown field error[E0609]: no field `1e1` on type `(u8, u8)` --> $DIR/float-field.rs:46:7 | LL | s.1.1e1f32; - | ^^^^^^^^ + | ^^^^^^^^ unknown field error: aborting due to 55 previous errors diff --git a/tests/ui/parser/fn-colon-return-type.stderr b/tests/ui/parser/fn-colon-return-type.stderr index 1de918782..b61a62a17 100644 --- a/tests/ui/parser/fn-colon-return-type.stderr +++ b/tests/ui/parser/fn-colon-return-type.stderr @@ -4,5 +4,5 @@ error: return types are denoted using `->` LL | fn foo(x: i32): i32 { | ^ help: use `->` instead -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/fn-defined-using-def.stderr b/tests/ui/parser/fn-defined-using-def.stderr index f34329012..972c861c7 100644 --- a/tests/ui/parser/fn-defined-using-def.stderr +++ b/tests/ui/parser/fn-defined-using-def.stderr @@ -6,5 +6,5 @@ LL | def foo() {} | | | help: write `fn` instead of `def` to declare a function -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/fn-defined-using-fun.stderr b/tests/ui/parser/fn-defined-using-fun.stderr index 2f6cfff35..3c8e586c0 100644 --- a/tests/ui/parser/fn-defined-using-fun.stderr +++ b/tests/ui/parser/fn-defined-using-fun.stderr @@ -6,5 +6,5 @@ LL | fun foo() {} | | | help: write `fn` instead of `fun` to declare a function -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/fn-defined-using-func.stderr b/tests/ui/parser/fn-defined-using-func.stderr index 355741e89..9dd90798d 100644 --- a/tests/ui/parser/fn-defined-using-func.stderr +++ b/tests/ui/parser/fn-defined-using-func.stderr @@ -6,5 +6,5 @@ LL | func foo() {} | | | help: write `fn` instead of `func` to declare a function -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/fn-defined-using-function.stderr b/tests/ui/parser/fn-defined-using-function.stderr index 43c33a2cd..504ab1bb9 100644 --- a/tests/ui/parser/fn-defined-using-function.stderr +++ b/tests/ui/parser/fn-defined-using-function.stderr @@ -6,5 +6,5 @@ LL | function foo() {} | | | help: write `fn` instead of `function` to declare a function -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/generic-statics.stderr b/tests/ui/parser/generic-statics.stderr index c757232b0..eb2e27360 100644 --- a/tests/ui/parser/generic-statics.stderr +++ b/tests/ui/parser/generic-statics.stderr @@ -4,5 +4,5 @@ error: static items may not have generic parameters LL | static S<T>: i32 = 0; | ^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/if-in-in.stderr b/tests/ui/parser/if-in-in.stderr index 0e69bc4b2..6117370c0 100644 --- a/tests/ui/parser/if-in-in.stderr +++ b/tests/ui/parser/if-in-in.stderr @@ -6,5 +6,5 @@ LL | for i in in 1..2 { | | | help: remove the duplicated `in` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/impl-item-const-semantic-fail.stderr b/tests/ui/parser/impl-item-const-semantic-fail.stderr index ec3bee0ce..579f4c29c 100644 --- a/tests/ui/parser/impl-item-const-semantic-fail.stderr +++ b/tests/ui/parser/impl-item-const-semantic-fail.stderr @@ -6,5 +6,5 @@ LL | const Y: u8; | | | help: provide a definition for the constant: `= <expr>;` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/impl-item-fn-no-body-semantic-fail.stderr b/tests/ui/parser/impl-item-fn-no-body-semantic-fail.stderr index 1acb72736..1704d99cf 100644 --- a/tests/ui/parser/impl-item-fn-no-body-semantic-fail.stderr +++ b/tests/ui/parser/impl-item-fn-no-body-semantic-fail.stderr @@ -6,5 +6,5 @@ LL | fn f(); | | | help: provide a definition for the function: `{ <body> }` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/impl-on-unsized-typo.stderr b/tests/ui/parser/impl-on-unsized-typo.stderr index 23dcc1efd..62e0d085e 100644 --- a/tests/ui/parser/impl-on-unsized-typo.stderr +++ b/tests/ui/parser/impl-on-unsized-typo.stderr @@ -4,5 +4,5 @@ error: expected one of `,`, `:`, `=`, or `>`, found `?` LL | impl<T ?Sized> Tr for T {} | ^ expected one of `,`, `:`, `=`, or `>` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/import-from-path.stderr b/tests/ui/parser/import-from-path.stderr index 93bdf82d0..b63e48d66 100644 --- a/tests/ui/parser/import-from-path.stderr +++ b/tests/ui/parser/import-from-path.stderr @@ -6,5 +6,5 @@ LL | use foo::{bar}::baz | = note: glob-like brace syntax must be last on the path -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/import-from-rename.stderr b/tests/ui/parser/import-from-rename.stderr index d78f6de92..2f267a8d0 100644 --- a/tests/ui/parser/import-from-rename.stderr +++ b/tests/ui/parser/import-from-rename.stderr @@ -6,5 +6,5 @@ LL | use foo::{bar} as baz; | = note: glob-like brace syntax must be last on the path -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/import-glob-path.stderr b/tests/ui/parser/import-glob-path.stderr index a93ef255c..3bde32d1e 100644 --- a/tests/ui/parser/import-glob-path.stderr +++ b/tests/ui/parser/import-glob-path.stderr @@ -6,5 +6,5 @@ LL | use foo::*::bar | = note: the wildcard token must be last on the path -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/import-glob-rename.stderr b/tests/ui/parser/import-glob-rename.stderr index e1a026b63..24e6c3f00 100644 --- a/tests/ui/parser/import-glob-rename.stderr +++ b/tests/ui/parser/import-glob-rename.stderr @@ -6,5 +6,5 @@ LL | use foo::* as baz; | = note: the wildcard token must be last on the path -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/inner-attr-after-doc-comment.stderr b/tests/ui/parser/inner-attr-after-doc-comment.stderr index 3ec3ad8e9..6dbc0fd93 100644 --- a/tests/ui/parser/inner-attr-after-doc-comment.stderr +++ b/tests/ui/parser/inner-attr-after-doc-comment.stderr @@ -19,5 +19,5 @@ LL - #![recursion_limit="100"] LL + #[recursion_limit="100"] | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/inner-attr.stderr b/tests/ui/parser/inner-attr.stderr index 331c254a5..57ca164fc 100644 --- a/tests/ui/parser/inner-attr.stderr +++ b/tests/ui/parser/inner-attr.stderr @@ -16,5 +16,5 @@ LL - #![recursion_limit="100"] LL + #[recursion_limit="100"] | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/int-literal-too-large-span.stderr b/tests/ui/parser/int-literal-too-large-span.stderr index 49d6aa5ef..d65a3052b 100644 --- a/tests/ui/parser/int-literal-too-large-span.stderr +++ b/tests/ui/parser/int-literal-too-large-span.stderr @@ -6,5 +6,5 @@ LL | 99999999999999999999999999999999999999999999999999999999999999999999999 | = note: value exceeds limit of `340282366920938463463374607431768211455` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/integer-literal-start-ident.stderr b/tests/ui/parser/integer-literal-start-ident.stderr index b2c661296..27f0baec8 100644 --- a/tests/ui/parser/integer-literal-start-ident.stderr +++ b/tests/ui/parser/integer-literal-start-ident.stderr @@ -10,5 +10,5 @@ help: identifiers cannot start with a number LL | fn 1main() {} | ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/intersection-patterns-2.stderr b/tests/ui/parser/intersection-patterns-2.stderr index f7e78814c..df34e2a42 100644 --- a/tests/ui/parser/intersection-patterns-2.stderr +++ b/tests/ui/parser/intersection-patterns-2.stderr @@ -9,5 +9,5 @@ LL | Some(x) @ Some(y) => {} | = note: bindings are `x`, `mut x`, `ref x`, and `ref mut x` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-100197-mut-let.stderr b/tests/ui/parser/issues/issue-100197-mut-let.stderr index 86658e4f3..07d136881 100644 --- a/tests/ui/parser/issues/issue-100197-mut-let.stderr +++ b/tests/ui/parser/issues/issue-100197-mut-let.stderr @@ -4,5 +4,5 @@ error: invalid variable declaration LL | mut let _x = 123; | ^^^^^^^ help: switch the order of `mut` and `let`: `let mut` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-101477-let.stderr b/tests/ui/parser/issues/issue-101477-let.stderr index 1b30d4b17..563483573 100644 --- a/tests/ui/parser/issues/issue-101477-let.stderr +++ b/tests/ui/parser/issues/issue-101477-let.stderr @@ -4,5 +4,5 @@ error: unexpected `==` LL | let x == 2; | ^^ help: try using `=` instead -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-101540.stderr b/tests/ui/parser/issues/issue-101540.stderr index 8af887050..40f1d339a 100644 --- a/tests/ui/parser/issues/issue-101540.stderr +++ b/tests/ui/parser/issues/issue-101540.stderr @@ -8,5 +8,5 @@ LL | struct S2 { | = help: consider creating a new `struct` definition instead of nesting -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-102182-impl-trait-recover.stderr b/tests/ui/parser/issues/issue-102182-impl-trait-recover.stderr index 52b6ae5df..cf05337f2 100644 --- a/tests/ui/parser/issues/issue-102182-impl-trait-recover.stderr +++ b/tests/ui/parser/issues/issue-102182-impl-trait-recover.stderr @@ -10,5 +10,5 @@ LL - fn foo<T: impl Trait>() {} LL + fn foo<T: Trait>() {} | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-103451.stderr b/tests/ui/parser/issues/issue-103451.stderr index 6aacd5012..7ad816e45 100644 --- a/tests/ui/parser/issues/issue-103451.stderr +++ b/tests/ui/parser/issues/issue-103451.stderr @@ -8,5 +8,5 @@ LL | x: [u8; R | | | unclosed delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-10392-2.stderr b/tests/ui/parser/issues/issue-10392-2.stderr index 4154ecfeb..3e5d5062b 100644 --- a/tests/ui/parser/issues/issue-10392-2.stderr +++ b/tests/ui/parser/issues/issue-10392-2.stderr @@ -8,5 +8,5 @@ LL | let A { .., } = a(); | | help: remove this comma | `..` must be at the end and cannot have a trailing comma -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-10392.stderr b/tests/ui/parser/issues/issue-10392.stderr index 438ea67d3..85090d054 100644 --- a/tests/ui/parser/issues/issue-10392.stderr +++ b/tests/ui/parser/issues/issue-10392.stderr @@ -6,5 +6,5 @@ LL | let A { , } = a(); | | | while parsing the fields for this pattern -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-104620.rs b/tests/ui/parser/issues/issue-104620.rs index f49476c44..fd0916b44 100644 --- a/tests/ui/parser/issues/issue-104620.rs +++ b/tests/ui/parser/issues/issue-104620.rs @@ -1,4 +1,4 @@ #![feature(rustc_attrs)] -#![rustc_dummy=5z] //~ ERROR unexpected expression: `5z` +#![rustc_dummy=5z] //~ ERROR invalid suffix `z` for number literal fn main() {} diff --git a/tests/ui/parser/issues/issue-104620.stderr b/tests/ui/parser/issues/issue-104620.stderr index d06a6b255..040c63a5f 100644 --- a/tests/ui/parser/issues/issue-104620.stderr +++ b/tests/ui/parser/issues/issue-104620.stderr @@ -1,8 +1,10 @@ -error: unexpected expression: `5z` +error: invalid suffix `z` for number literal --> $DIR/issue-104620.rs:3:16 | LL | #![rustc_dummy=5z] - | ^^ + | ^^ invalid suffix `z` + | + = help: the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.) -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-105366.stderr b/tests/ui/parser/issues/issue-105366.stderr index 0a7408e2c..18c04dfaf 100644 --- a/tests/ui/parser/issues/issue-105366.stderr +++ b/tests/ui/parser/issues/issue-105366.stderr @@ -9,5 +9,5 @@ help: replace `fn` with `impl` here LL | impl From<i32> for Foo { | ~~~~ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-10636-1.stderr b/tests/ui/parser/issues/issue-10636-1.stderr index 1e6294ebe..a7402e071 100644 --- a/tests/ui/parser/issues/issue-10636-1.stderr +++ b/tests/ui/parser/issues/issue-10636-1.stderr @@ -7,5 +7,5 @@ LL | struct Obj { LL | ) | ^ mismatched closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-10636-2.stderr b/tests/ui/parser/issues/issue-10636-2.stderr index 4cd4be180..2dc615246 100644 --- a/tests/ui/parser/issues/issue-10636-2.stderr +++ b/tests/ui/parser/issues/issue-10636-2.stderr @@ -9,5 +9,5 @@ LL | option.map(|some| 42; LL | } | ^ mismatched closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-107705.stderr b/tests/ui/parser/issues/issue-107705.stderr index d2d613461..2d0c3e0e6 100644 --- a/tests/ui/parser/issues/issue-107705.stderr +++ b/tests/ui/parser/issues/issue-107705.stderr @@ -6,5 +6,5 @@ LL | fn f() {a(b:&, | | | unclosed delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.stderr b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.stderr index 7cda66757..78017babb 100644 --- a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.stderr +++ b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.stderr @@ -7,5 +7,5 @@ LL | pub fn func<F>() where F: FnOnce -> () {} | | help: try adding parentheses | `Fn` bounds require arguments in parentheses -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-108242-semicolon-recovery.stderr b/tests/ui/parser/issues/issue-108242-semicolon-recovery.stderr index f68d6d501..e12283b25 100644 --- a/tests/ui/parser/issues/issue-108242-semicolon-recovery.stderr +++ b/tests/ui/parser/issues/issue-108242-semicolon-recovery.stderr @@ -9,5 +9,5 @@ LL | foo(; LL | } | ^ mismatched closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-111148.stderr b/tests/ui/parser/issues/issue-111148.stderr index e6595a5cb..bcfca981d 100644 --- a/tests/ui/parser/issues/issue-111148.stderr +++ b/tests/ui/parser/issues/issue-111148.stderr @@ -4,5 +4,5 @@ error: expected one of `#`, `>`, `const`, identifier, or lifetime, found `<` LL | fn a<<i<Y<w<># | ^ expected one of `#`, `>`, `const`, identifier, or lifetime -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-111416.stderr b/tests/ui/parser/issues/issue-111416.stderr index ddacf4d6d..36f6c5b01 100644 --- a/tests/ui/parser/issues/issue-111416.stderr +++ b/tests/ui/parser/issues/issue-111416.stderr @@ -14,5 +14,5 @@ LL - let my = monad_bind(mx, T: Try); LL + let my = monad_bind(mx, Try); | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-113110-non-item-at-module-root.stderr b/tests/ui/parser/issues/issue-113110-non-item-at-module-root.stderr index 0789c4548..a47dd4103 100644 --- a/tests/ui/parser/issues/issue-113110-non-item-at-module-root.stderr +++ b/tests/ui/parser/issues/issue-113110-non-item-at-module-root.stderr @@ -6,5 +6,5 @@ LL | 5 | = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-113203.stderr b/tests/ui/parser/issues/issue-113203.stderr index 97304a89c..5db628d59 100644 --- a/tests/ui/parser/issues/issue-113203.stderr +++ b/tests/ui/parser/issues/issue-113203.stderr @@ -4,5 +4,5 @@ error: incorrect use of `await` LL | await {}() | ^^^^^^^^ help: `await` is a postfix operation: `{}.await` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-113342.stderr b/tests/ui/parser/issues/issue-113342.stderr index a0c5e665f..6d9f22f6a 100644 --- a/tests/ui/parser/issues/issue-113342.stderr +++ b/tests/ui/parser/issues/issue-113342.stderr @@ -7,5 +7,5 @@ LL | extern "C" pub fn id(x: i32) -> i32 { x } | | expected `fn` | help: visibility `pub` must come before `extern "C"`: `pub extern "C"` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-114219.stderr b/tests/ui/parser/issues/issue-114219.stderr index 90dcdc427..02323cb99 100644 --- a/tests/ui/parser/issues/issue-114219.stderr +++ b/tests/ui/parser/issues/issue-114219.stderr @@ -4,5 +4,5 @@ error: `async move` blocks are only allowed in Rust 2018 or later LL | async move {}; | ^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-118530-ice.rs b/tests/ui/parser/issues/issue-118530-ice.rs new file mode 100644 index 000000000..e758e5af4 --- /dev/null +++ b/tests/ui/parser/issues/issue-118530-ice.rs @@ -0,0 +1,15 @@ +fn bar() -> String { + #[cfg] + [1, 2, 3].iter() //~ ERROR expected `;`, found `#` + #[feature] + attr::fn bar() -> String { //~ ERROR expected identifier, found keyword `fn` + //~^ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `->` + //~| ERROR expected `;`, found `bar` + #[attr] + [1, 2, 3].iter().map().collect::<String>() + #[attr] + +}() +} + +fn main() { } diff --git a/tests/ui/parser/issues/issue-118530-ice.stderr b/tests/ui/parser/issues/issue-118530-ice.stderr new file mode 100644 index 000000000..ef573fb7b --- /dev/null +++ b/tests/ui/parser/issues/issue-118530-ice.stderr @@ -0,0 +1,43 @@ +error: expected `;`, found `#` + --> $DIR/issue-118530-ice.rs:3:21 + | +LL | #[cfg] + | ------ only `;` terminated statements or tail expressions are allowed after this attribute +LL | [1, 2, 3].iter() + | ^ expected `;` here +LL | #[feature] + | - unexpected token + | +help: add `;` here + | +LL | [1, 2, 3].iter(); + | + +help: alternatively, consider surrounding the expression with a block + | +LL | { [1, 2, 3].iter() } + | + + + +error: expected identifier, found keyword `fn` + --> $DIR/issue-118530-ice.rs:5:11 + | +LL | attr::fn bar() -> String { + | ^^ expected identifier, found keyword + +error: expected `;`, found `bar` + --> $DIR/issue-118530-ice.rs:5:13 + | +LL | #[feature] + | ---------- only `;` terminated statements or tail expressions are allowed after this attribute +LL | attr::fn bar() -> String { + | ^--- unexpected token + | | + | help: add `;` here + +error: expected one of `.`, `;`, `?`, `}`, or an operator, found `->` + --> $DIR/issue-118530-ice.rs:5:20 + | +LL | attr::fn bar() -> String { + | ^^ expected one of `.`, `;`, `?`, `}`, or an operator + +error: aborting due to 4 previous errors + diff --git a/tests/ui/parser/issues/issue-118531-ice.rs b/tests/ui/parser/issues/issue-118531-ice.rs new file mode 100644 index 000000000..24794f060 --- /dev/null +++ b/tests/ui/parser/issues/issue-118531-ice.rs @@ -0,0 +1,10 @@ +fn bar() -> String { + #[cfg(feature = )] + [1, 2, 3].iter().map().collect::<String>() //~ ERROR expected `;`, found `#` + + #[attr] //~ ERROR attributes on expressions are experimental [E0658] + //~^ ERROR cannot find attribute `attr` in this scope + String::new() +} + +fn main() { } diff --git a/tests/ui/parser/issues/issue-118531-ice.stderr b/tests/ui/parser/issues/issue-118531-ice.stderr new file mode 100644 index 000000000..a32292dcb --- /dev/null +++ b/tests/ui/parser/issues/issue-118531-ice.stderr @@ -0,0 +1,38 @@ +error: expected `;`, found `#` + --> $DIR/issue-118531-ice.rs:3:47 + | +LL | #[cfg(feature = )] + | ------------------ only `;` terminated statements or tail expressions are allowed after this attribute +LL | [1, 2, 3].iter().map().collect::<String>() + | ^ expected `;` here +LL | +LL | #[attr] + | - unexpected token + | +help: add `;` here + | +LL | [1, 2, 3].iter().map().collect::<String>(); + | + +help: alternatively, consider surrounding the expression with a block + | +LL | { [1, 2, 3].iter().map().collect::<String>() } + | + + + +error[E0658]: attributes on expressions are experimental + --> $DIR/issue-118531-ice.rs:5:5 + | +LL | #[attr] + | ^^^^^^^ + | + = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information + = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + +error: cannot find attribute `attr` in this scope + --> $DIR/issue-118531-ice.rs:5:7 + | +LL | #[attr] + | ^^^^ + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/parser/issues/issue-14303-fncall.full.stderr b/tests/ui/parser/issues/issue-14303-fncall.full.stderr index 0c152516a..1986f70bf 100644 --- a/tests/ui/parser/issues/issue-14303-fncall.full.stderr +++ b/tests/ui/parser/issues/issue-14303-fncall.full.stderr @@ -4,6 +4,6 @@ error[E0747]: type provided when a lifetime was expected LL | .collect::<Vec<S<_, 'a>>>(); | ^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0747`. diff --git a/tests/ui/parser/issues/issue-14303-fncall.generic_arg.stderr b/tests/ui/parser/issues/issue-14303-fncall.generic_arg.stderr index 571815776..2de59b8c7 100644 --- a/tests/ui/parser/issues/issue-14303-fncall.generic_arg.stderr +++ b/tests/ui/parser/issues/issue-14303-fncall.generic_arg.stderr @@ -4,6 +4,6 @@ error[E0747]: inferred provided when a lifetime was expected LL | .collect::<Vec<S<_, 'a>>>(); | ^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0747`. diff --git a/tests/ui/parser/issues/issue-15914.stderr b/tests/ui/parser/issues/issue-15914.stderr index ea26453f8..c88fd4e55 100644 --- a/tests/ui/parser/issues/issue-15914.stderr +++ b/tests/ui/parser/issues/issue-15914.stderr @@ -4,5 +4,5 @@ error: expected identifier, found `(` LL | (); | ^ expected identifier -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-15980.stderr b/tests/ui/parser/issues/issue-15980.stderr index cf8d01147..c3c56c46a 100644 --- a/tests/ui/parser/issues/issue-15980.stderr +++ b/tests/ui/parser/issues/issue-15980.stderr @@ -16,5 +16,5 @@ help: you might have meant to start a match arm after the match guard LL | Err(ref e) if e.kind == io::EndOfFile => { | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-1655.stderr b/tests/ui/parser/issues/issue-1655.stderr index 0c390a0ec..536b583aa 100644 --- a/tests/ui/parser/issues/issue-1655.stderr +++ b/tests/ui/parser/issues/issue-1655.stderr @@ -4,5 +4,5 @@ error: expected one of `!` or `[`, found `vec` LL | #vec[doc( | ^^^ expected one of `!` or `[` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-17718-const-mut.stderr b/tests/ui/parser/issues/issue-17718-const-mut.stderr index 8251ce999..a27f51708 100644 --- a/tests/ui/parser/issues/issue-17718-const-mut.stderr +++ b/tests/ui/parser/issues/issue-17718-const-mut.stderr @@ -6,5 +6,5 @@ LL | const LL | mut | ^^^ cannot be mutable -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-17904-2.stderr b/tests/ui/parser/issues/issue-17904-2.stderr index 7185a5e57..211ffcedd 100644 --- a/tests/ui/parser/issues/issue-17904-2.stderr +++ b/tests/ui/parser/issues/issue-17904-2.stderr @@ -6,5 +6,5 @@ LL | struct Bar<T> { x: T } where T: Copy | = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-17904.stderr b/tests/ui/parser/issues/issue-17904.stderr index aa343975d..81c6e3bed 100644 --- a/tests/ui/parser/issues/issue-17904.stderr +++ b/tests/ui/parser/issues/issue-17904.stderr @@ -13,5 +13,5 @@ LL - struct Foo<T> where T: Copy, (T); LL + struct Foo<T>(T) where T: Copy; | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-1802-1.stderr b/tests/ui/parser/issues/issue-1802-1.stderr index 954cc0bee..5ddc5ae58 100644 --- a/tests/ui/parser/issues/issue-1802-1.stderr +++ b/tests/ui/parser/issues/issue-1802-1.stderr @@ -4,6 +4,6 @@ error[E0768]: no valid digits found for number LL | log(error, 0b); | ^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0768`. diff --git a/tests/ui/parser/issues/issue-1802-2.stderr b/tests/ui/parser/issues/issue-1802-2.stderr index 49043d07b..7c802e4bd 100644 --- a/tests/ui/parser/issues/issue-1802-2.stderr +++ b/tests/ui/parser/issues/issue-1802-2.stderr @@ -4,6 +4,6 @@ error[E0768]: no valid digits found for number LL | log(error, 0b); | ^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0768`. diff --git a/tests/ui/parser/issues/issue-19398.stderr b/tests/ui/parser/issues/issue-19398.stderr index 1da00960a..236fac673 100644 --- a/tests/ui/parser/issues/issue-19398.stderr +++ b/tests/ui/parser/issues/issue-19398.stderr @@ -9,5 +9,5 @@ LL | LL | } | - the item list ends here -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-20616-1.stderr b/tests/ui/parser/issues/issue-20616-1.stderr index 816046237..b7a8d22d8 100644 --- a/tests/ui/parser/issues/issue-20616-1.stderr +++ b/tests/ui/parser/issues/issue-20616-1.stderr @@ -4,5 +4,5 @@ error: expected one of `,`, `:`, or `>`, found `T` LL | type Type_1<'a T> = &'a T; | ^ expected one of `,`, `:`, or `>` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-20616-2.stderr b/tests/ui/parser/issues/issue-20616-2.stderr index 42059685c..038b2ffc7 100644 --- a/tests/ui/parser/issues/issue-20616-2.stderr +++ b/tests/ui/parser/issues/issue-20616-2.stderr @@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here LL | type Type_2 = Type_1_<'static> ()>; | + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-20616-3.stderr b/tests/ui/parser/issues/issue-20616-3.stderr index dbff116e5..10e5befe2 100644 --- a/tests/ui/parser/issues/issue-20616-3.stderr +++ b/tests/ui/parser/issues/issue-20616-3.stderr @@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here LL | type Type_3<T> = Box<T>,,>; | + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-20616-4.stderr b/tests/ui/parser/issues/issue-20616-4.stderr index 48a06e00b..df619b4c7 100644 --- a/tests/ui/parser/issues/issue-20616-4.stderr +++ b/tests/ui/parser/issues/issue-20616-4.stderr @@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here LL | type Type_4<T> = Type_1_<'static>,, T>; | + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-20616-5.stderr b/tests/ui/parser/issues/issue-20616-5.stderr index 84bee2ad1..709a5467d 100644 --- a/tests/ui/parser/issues/issue-20616-5.stderr +++ b/tests/ui/parser/issues/issue-20616-5.stderr @@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here LL | type Type_5<'a> = Type_1_<'a, ()>,,>; | + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-20616-6.stderr b/tests/ui/parser/issues/issue-20616-6.stderr index 67de41b97..7fe1f1c45 100644 --- a/tests/ui/parser/issues/issue-20616-6.stderr +++ b/tests/ui/parser/issues/issue-20616-6.stderr @@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here LL | type Type_6 = Type_5_<'a>,,>; | + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-20616-7.stderr b/tests/ui/parser/issues/issue-20616-7.stderr index 3b8e07fa0..d9e97301f 100644 --- a/tests/ui/parser/issues/issue-20616-7.stderr +++ b/tests/ui/parser/issues/issue-20616-7.stderr @@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here LL | type Type_7 = Box<()>,,>; | + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-20616-8.stderr b/tests/ui/parser/issues/issue-20616-8.stderr index e9f37e50f..f8d7dc63c 100644 --- a/tests/ui/parser/issues/issue-20616-8.stderr +++ b/tests/ui/parser/issues/issue-20616-8.stderr @@ -4,5 +4,5 @@ error: expected one of `#`, `>`, `const`, identifier, or lifetime, found `,` LL | type Type_8<'a,,> = &'a (); | ^ expected one of `#`, `>`, `const`, identifier, or lifetime -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-20616-9.stderr b/tests/ui/parser/issues/issue-20616-9.stderr index dc309d1bc..5dccacdb6 100644 --- a/tests/ui/parser/issues/issue-20616-9.stderr +++ b/tests/ui/parser/issues/issue-20616-9.stderr @@ -4,5 +4,5 @@ error: expected one of `#`, `>`, `const`, identifier, or lifetime, found `,` LL | type Type_9<T,,> = Box<T>; | ^ expected one of `#`, `>`, `const`, identifier, or lifetime -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-20711-2.stderr b/tests/ui/parser/issues/issue-20711-2.stderr index 12b18bbc5..9fb729895 100644 --- a/tests/ui/parser/issues/issue-20711-2.stderr +++ b/tests/ui/parser/issues/issue-20711-2.stderr @@ -10,5 +10,5 @@ LL | LL | } | - the item list ends here -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-20711.stderr b/tests/ui/parser/issues/issue-20711.stderr index 4af4b22be..256fb0ade 100644 --- a/tests/ui/parser/issues/issue-20711.stderr +++ b/tests/ui/parser/issues/issue-20711.stderr @@ -9,5 +9,5 @@ LL | LL | } | - the item list ends here -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-21146.stderr b/tests/ui/parser/issues/issue-21146.stderr index c71fda3d6..e83c62afe 100644 --- a/tests/ui/parser/issues/issue-21146.stderr +++ b/tests/ui/parser/issues/issue-21146.stderr @@ -4,5 +4,5 @@ error: expected one of `!` or `::`, found `<eof>` LL | parse_error | ^^^^^^^^^^^ expected one of `!` or `::` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-21153.stderr b/tests/ui/parser/issues/issue-21153.stderr index cbfa9ded3..8839eed84 100644 --- a/tests/ui/parser/issues/issue-21153.stderr +++ b/tests/ui/parser/issues/issue-21153.stderr @@ -9,5 +9,5 @@ LL | LL | } | - the item list ends here -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-22647.stderr b/tests/ui/parser/issues/issue-22647.stderr index 585e70266..bdf74af63 100644 --- a/tests/ui/parser/issues/issue-22647.stderr +++ b/tests/ui/parser/issues/issue-22647.stderr @@ -9,5 +9,5 @@ help: use `::<...>` instead of `<...>` to specify lifetime, type, or const argum LL | let caller::<F> = |f: F| | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-22712.stderr b/tests/ui/parser/issues/issue-22712.stderr index 7f9d99d8e..aeca95ed6 100644 --- a/tests/ui/parser/issues/issue-22712.stderr +++ b/tests/ui/parser/issues/issue-22712.stderr @@ -9,5 +9,5 @@ help: use `::<...>` instead of `<...>` to specify lifetime, type, or const argum LL | let Foo::<Vec<u8>> | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-2354-1.stderr b/tests/ui/parser/issues/issue-2354-1.stderr index 7ea0f2a98..edd64ecf3 100644 --- a/tests/ui/parser/issues/issue-2354-1.stderr +++ b/tests/ui/parser/issues/issue-2354-1.stderr @@ -4,5 +4,5 @@ error: unexpected closing delimiter: `}` LL | static foo: isize = 2; } | ^ unexpected closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-2354.stderr b/tests/ui/parser/issues/issue-2354.stderr index b89ed3958..fd649a575 100644 --- a/tests/ui/parser/issues/issue-2354.stderr +++ b/tests/ui/parser/issues/issue-2354.stderr @@ -12,5 +12,5 @@ LL | } LL | | ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-24197.stderr b/tests/ui/parser/issues/issue-24197.stderr index fd7015ccd..3ef707f39 100644 --- a/tests/ui/parser/issues/issue-24197.stderr +++ b/tests/ui/parser/issues/issue-24197.stderr @@ -4,5 +4,5 @@ error: expected one of `:`, `;`, `=`, `@`, or `|`, found `[` LL | let buf[0] = 0; | ^ expected one of `:`, `;`, `=`, `@`, or `|` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-24375.rs b/tests/ui/parser/issues/issue-24375.rs index 1d128d33e..8d1bc579e 100644 --- a/tests/ui/parser/issues/issue-24375.rs +++ b/tests/ui/parser/issues/issue-24375.rs @@ -3,7 +3,7 @@ static tmp : [&'static str; 2] = ["hello", "he"]; fn main() { let z = "hello"; match z { - tmp[0] => {} //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `[` + tmp[0] => {} //~ ERROR expected one of `,`, `=>`, `@`, `if`, `|`, or `}`, found `[` _ => {} } } diff --git a/tests/ui/parser/issues/issue-24375.stderr b/tests/ui/parser/issues/issue-24375.stderr index 7aed88768..2b980a552 100644 --- a/tests/ui/parser/issues/issue-24375.stderr +++ b/tests/ui/parser/issues/issue-24375.stderr @@ -1,8 +1,8 @@ -error: expected one of `=>`, `@`, `if`, or `|`, found `[` +error: expected one of `,`, `=>`, `@`, `if`, `|`, or `}`, found `[` --> $DIR/issue-24375.rs:6:12 | LL | tmp[0] => {} - | ^ expected one of `=>`, `@`, `if`, or `|` + | ^ expected one of `,`, `=>`, `@`, `if`, `|`, or `}` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-24780.stderr b/tests/ui/parser/issues/issue-24780.stderr index d9470191b..43e200102 100644 --- a/tests/ui/parser/issues/issue-24780.stderr +++ b/tests/ui/parser/issues/issue-24780.stderr @@ -4,5 +4,5 @@ error: expected one of `!`, `+`, `::`, `where`, or `{`, found `>` LL | fn foo() -> Vec<usize>> { | ^ expected one of `!`, `+`, `::`, `where`, or `{` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-3036.stderr b/tests/ui/parser/issues/issue-3036.stderr index e02223931..3dd89b7e8 100644 --- a/tests/ui/parser/issues/issue-3036.stderr +++ b/tests/ui/parser/issues/issue-3036.stderr @@ -6,5 +6,5 @@ LL | let _x = 3 LL | } | - unexpected token -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-31804.stderr b/tests/ui/parser/issues/issue-31804.stderr index 76e68b0b3..d3d2c2a0f 100644 --- a/tests/ui/parser/issues/issue-31804.stderr +++ b/tests/ui/parser/issues/issue-31804.stderr @@ -4,5 +4,5 @@ error: expected pattern, found `}` LL | } | ^ expected pattern -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-32214.stderr b/tests/ui/parser/issues/issue-32214.stderr index d0a9b5299..2ef4305df 100644 --- a/tests/ui/parser/issues/issue-32214.stderr +++ b/tests/ui/parser/issues/issue-32214.stderr @@ -11,5 +11,5 @@ help: move the constraint after the generic argument LL | pub fn test<W, I: Trait<W, Item = ()> >() {} | ~~~~~~~~~~~~~~ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-32446.stderr b/tests/ui/parser/issues/issue-32446.stderr index 7515369aa..7319e839b 100644 --- a/tests/ui/parser/issues/issue-32446.stderr +++ b/tests/ui/parser/issues/issue-32446.stderr @@ -7,5 +7,5 @@ LL | trait T { ... } | | non-item starts here | item list starts here -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-32501.stderr b/tests/ui/parser/issues/issue-32501.stderr index d53302449..c0513a640 100644 --- a/tests/ui/parser/issues/issue-32501.stderr +++ b/tests/ui/parser/issues/issue-32501.stderr @@ -2,9 +2,9 @@ error: `mut` must be followed by a named binding --> $DIR/issue-32501.rs:7:9 | LL | let mut _ = 0; - | ^^^^^ help: remove the `mut` prefix: `_` + | ^^^^ help: remove the `mut` prefix | = note: `mut` may be followed by `variable` and `variable @ pattern` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-33262.stderr b/tests/ui/parser/issues/issue-33262.stderr index 2aff32839..ec4934eb7 100644 --- a/tests/ui/parser/issues/issue-33262.stderr +++ b/tests/ui/parser/issues/issue-33262.stderr @@ -4,5 +4,5 @@ error: expected type, found `{` LL | for i in 0..a as { } | ^ expected type -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-33455.stderr b/tests/ui/parser/issues/issue-33455.stderr index c535ef23b..573614a5e 100644 --- a/tests/ui/parser/issues/issue-33455.stderr +++ b/tests/ui/parser/issues/issue-33455.stderr @@ -4,5 +4,5 @@ error: expected one of `::`, `;`, or `as`, found `.` LL | use foo.bar; | ^ expected one of `::`, `;`, or `as` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-34222-1.stderr b/tests/ui/parser/issues/issue-34222-1.stderr index b451484ba..b2a6ae93a 100644 --- a/tests/ui/parser/issues/issue-34222-1.stderr +++ b/tests/ui/parser/issues/issue-34222-1.stderr @@ -6,6 +6,6 @@ LL | /// comment | = help: doc comments must come before what they document, if a comment was intended use `//` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0585`. diff --git a/tests/ui/parser/issues/issue-34255-1.stderr b/tests/ui/parser/issues/issue-34255-1.stderr index 0e2b0d62e..1e72f040b 100644 --- a/tests/ui/parser/issues/issue-34255-1.stderr +++ b/tests/ui/parser/issues/issue-34255-1.stderr @@ -14,5 +14,5 @@ LL - Test::Drill(field: 42); LL + Test::Drill(42); | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-39616.stderr b/tests/ui/parser/issues/issue-39616.stderr index 393d1f2e2..da85bcb44 100644 --- a/tests/ui/parser/issues/issue-39616.stderr +++ b/tests/ui/parser/issues/issue-39616.stderr @@ -4,5 +4,5 @@ error: expected type, found `0` LL | fn foo(a: [0; 1]) {} | ^ expected type -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-43692.stderr b/tests/ui/parser/issues/issue-43692.stderr index baf998035..1ce3aa671 100644 --- a/tests/ui/parser/issues/issue-43692.stderr +++ b/tests/ui/parser/issues/issue-43692.stderr @@ -4,5 +4,5 @@ error: invalid start of unicode escape: `_` LL | '\u{_10FFFF}'; | ^ invalid start of unicode escape -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-44021.stderr b/tests/ui/parser/issues/issue-44021.stderr index b888cd989..8a9326f90 100644 --- a/tests/ui/parser/issues/issue-44021.stderr +++ b/tests/ui/parser/issues/issue-44021.stderr @@ -4,5 +4,5 @@ error: expected one of `:`, `@`, or `|`, found `}` LL | fn f() {|x, y} | ^ expected one of `:`, `@`, or `|` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-44406.stderr b/tests/ui/parser/issues/issue-44406.stderr index 69ff64c27..d005f116e 100644 --- a/tests/ui/parser/issues/issue-44406.stderr +++ b/tests/ui/parser/issues/issue-44406.stderr @@ -18,5 +18,5 @@ LL - bar(baz: $rest) LL + bar(: $rest) | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-45296.stderr b/tests/ui/parser/issues/issue-45296.stderr index 081a72054..1d2281df1 100644 --- a/tests/ui/parser/issues/issue-45296.stderr +++ b/tests/ui/parser/issues/issue-45296.stderr @@ -13,5 +13,5 @@ LL - #![allow(unused_variables)] LL + #[allow(unused_variables)] | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-46186.stderr b/tests/ui/parser/issues/issue-46186.stderr index 0766c8a33..c67c271e1 100644 --- a/tests/ui/parser/issues/issue-46186.stderr +++ b/tests/ui/parser/issues/issue-46186.stderr @@ -6,5 +6,5 @@ LL | }; | = help: braced struct declarations are not followed by a semicolon -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-48508.rs b/tests/ui/parser/issues/issue-48508.rs index 1e7db9df8..b66e09620 100644 --- a/tests/ui/parser/issues/issue-48508.rs +++ b/tests/ui/parser/issues/issue-48508.rs @@ -7,7 +7,6 @@ // issue-48508-aux.rs // compile-flags:-g -// ignore-asmjs wasm2js does not support source maps yet #![allow(uncommon_codepoints)] diff --git a/tests/ui/parser/issues/issue-48636.stderr b/tests/ui/parser/issues/issue-48636.stderr index 6177870d1..488a046a5 100644 --- a/tests/ui/parser/issues/issue-48636.stderr +++ b/tests/ui/parser/issues/issue-48636.stderr @@ -10,6 +10,6 @@ LL | /// The ID of the parent core | = help: doc comments must come before what they document, if a comment was intended use `//` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0585`. diff --git a/tests/ui/parser/issues/issue-51602.stderr b/tests/ui/parser/issues/issue-51602.stderr index 4a5653fdb..7b50e0ad0 100644 --- a/tests/ui/parser/issues/issue-51602.stderr +++ b/tests/ui/parser/issues/issue-51602.stderr @@ -10,5 +10,5 @@ note: the `if` expression is missing a block after this condition LL | if i in 1..10 { | ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-5544-a.stderr b/tests/ui/parser/issues/issue-5544-a.stderr index 6e68c7585..aeb134600 100644 --- a/tests/ui/parser/issues/issue-5544-a.stderr +++ b/tests/ui/parser/issues/issue-5544-a.stderr @@ -6,5 +6,5 @@ LL | let __isize = 340282366920938463463374607431768211456; // 2^128 | = note: value exceeds limit of `340282366920938463463374607431768211455` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-5544-b.stderr b/tests/ui/parser/issues/issue-5544-b.stderr index 5d0e76d5d..65e6f196b 100644 --- a/tests/ui/parser/issues/issue-5544-b.stderr +++ b/tests/ui/parser/issues/issue-5544-b.stderr @@ -6,5 +6,5 @@ LL | let __isize = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff_ff; | = note: value exceeds limit of `0xffffffffffffffffffffffffffffffff` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-56031.stderr b/tests/ui/parser/issues/issue-56031.stderr index 2fa05dd2d..8031bf82f 100644 --- a/tests/ui/parser/issues/issue-56031.stderr +++ b/tests/ui/parser/issues/issue-56031.stderr @@ -14,5 +14,5 @@ LL - impl for T {} LL + impl T {} | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-57198.stderr b/tests/ui/parser/issues/issue-57198.stderr index dd70b4022..dca0d3ea4 100644 --- a/tests/ui/parser/issues/issue-57198.stderr +++ b/tests/ui/parser/issues/issue-57198.stderr @@ -9,5 +9,5 @@ help: escape `for` to use it as an identifier LL | m::r#for(); | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-5806.stderr b/tests/ui/parser/issues/issue-5806.stderr index bdb5c91ff..4b025bd19 100644 --- a/tests/ui/parser/issues/issue-5806.stderr +++ b/tests/ui/parser/issues/issue-5806.stderr @@ -4,5 +4,5 @@ error: couldn't read $DIR/../parser: $ACCESS_DENIED_MSG (os error $ACCESS_DENIED LL | mod foo; | ^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs index a596a9f2d..a2ea8ad36 100644 --- a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs +++ b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs @@ -1,5 +1,5 @@ // Fixed in #66054. // ignore-tidy-trailing-newlines // error-pattern: this file contains an unclosed delimiter -// error-pattern: aborting due to previous error +// error-pattern: aborting due to 1 previous error #[Ѕ
\ No newline at end of file diff --git a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.stderr b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.stderr index c79e8b4fb..14f5469f6 100644 --- a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.stderr +++ b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.stderr @@ -6,5 +6,5 @@ LL | #[Ѕ | | | unclosed delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-58856-1.stderr b/tests/ui/parser/issues/issue-58856-1.stderr index 77ad8acbd..2c3334391 100644 --- a/tests/ui/parser/issues/issue-58856-1.stderr +++ b/tests/ui/parser/issues/issue-58856-1.stderr @@ -8,5 +8,5 @@ LL | fn b(self> LL | } | ^ mismatched closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-58856-2.stderr b/tests/ui/parser/issues/issue-58856-2.stderr index 5fcf5bcc1..d3255fca0 100644 --- a/tests/ui/parser/issues/issue-58856-2.stderr +++ b/tests/ui/parser/issues/issue-58856-2.stderr @@ -9,5 +9,5 @@ LL | fn how_are_you(&self -> Empty { LL | } | ^ mismatched closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-60075.stderr b/tests/ui/parser/issues/issue-60075.stderr index cd8f1231f..b40412aba 100644 --- a/tests/ui/parser/issues/issue-60075.stderr +++ b/tests/ui/parser/issues/issue-60075.stderr @@ -7,5 +7,5 @@ LL | let _ = if true { LL | }); | ^ mismatched closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-61858.stderr b/tests/ui/parser/issues/issue-61858.stderr index 03f51c6e3..6bdfec938 100644 --- a/tests/ui/parser/issues/issue-61858.stderr +++ b/tests/ui/parser/issues/issue-61858.stderr @@ -10,5 +10,5 @@ note: the `if` expression is missing a block after this condition LL | (if foobar) | ^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-62524.rs b/tests/ui/parser/issues/issue-62524.rs index fa7c626f5..dd86fc9a7 100644 --- a/tests/ui/parser/issues/issue-62524.rs +++ b/tests/ui/parser/issues/issue-62524.rs @@ -1,5 +1,5 @@ // ignore-tidy-trailing-newlines -// error-pattern: aborting due to previous error +// error-pattern: aborting due to 1 previous error #![allow(uncommon_codepoints)] y![ diff --git a/tests/ui/parser/issues/issue-62524.stderr b/tests/ui/parser/issues/issue-62524.stderr index 0cbaacd4c..d83a49aed 100644 --- a/tests/ui/parser/issues/issue-62524.stderr +++ b/tests/ui/parser/issues/issue-62524.stderr @@ -6,5 +6,5 @@ LL | y![ LL | Ϥ, | ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-62546.stderr b/tests/ui/parser/issues/issue-62546.stderr index 80c1c7168..6889cb3b8 100644 --- a/tests/ui/parser/issues/issue-62546.stderr +++ b/tests/ui/parser/issues/issue-62546.stderr @@ -4,5 +4,5 @@ error: this file contains an unclosed delimiter LL | pub t(# | - unclosed delimiter ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-62554.stderr b/tests/ui/parser/issues/issue-62554.stderr index 4637c795a..37314dd39 100644 --- a/tests/ui/parser/issues/issue-62554.stderr +++ b/tests/ui/parser/issues/issue-62554.stderr @@ -9,5 +9,5 @@ LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s | | | unclosed delimiter | unclosed delimiter unclosed delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-62660.stderr b/tests/ui/parser/issues/issue-62660.stderr index 14c0bdcb1..310b433f2 100644 --- a/tests/ui/parser/issues/issue-62660.stderr +++ b/tests/ui/parser/issues/issue-62660.stderr @@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here LL | pub fn foo(_: i32, self: Box<Self>) {} | + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-62881.stderr b/tests/ui/parser/issues/issue-62881.stderr index e57cbd181..2165a81a0 100644 --- a/tests/ui/parser/issues/issue-62881.stderr +++ b/tests/ui/parser/issues/issue-62881.stderr @@ -4,5 +4,5 @@ error: this file contains an unclosed delimiter LL | fn f() -> isize { fn f() -> isize {} pub f< | - unclosed delimiter ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-62894.stderr b/tests/ui/parser/issues/issue-62894.stderr index 700479076..870633fc9 100644 --- a/tests/ui/parser/issues/issue-62894.stderr +++ b/tests/ui/parser/issues/issue-62894.stderr @@ -10,5 +10,5 @@ LL | LL | fn main() {} | ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-63135.rs b/tests/ui/parser/issues/issue-63135.rs index d61197dc5..2e1ac080b 100644 --- a/tests/ui/parser/issues/issue-63135.rs +++ b/tests/ui/parser/issues/issue-63135.rs @@ -1,3 +1,3 @@ // error-pattern: this file contains an unclosed delimiter -// error-pattern: aborting due to previous error +// error-pattern: aborting due to 1 previous error fn i(n{...,f # diff --git a/tests/ui/parser/issues/issue-63135.stderr b/tests/ui/parser/issues/issue-63135.stderr index ff9d99c28..9204f561e 100644 --- a/tests/ui/parser/issues/issue-63135.stderr +++ b/tests/ui/parser/issues/issue-63135.stderr @@ -7,5 +7,5 @@ LL | fn i(n{...,f # | | unclosed delimiter | unclosed delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-65122-mac-invoc-in-mut-patterns.stderr b/tests/ui/parser/issues/issue-65122-mac-invoc-in-mut-patterns.stderr index 8c032e588..2bd87ee0c 100644 --- a/tests/ui/parser/issues/issue-65122-mac-invoc-in-mut-patterns.stderr +++ b/tests/ui/parser/issues/issue-65122-mac-invoc-in-mut-patterns.stderr @@ -2,7 +2,7 @@ error: `mut` must be followed by a named binding --> $DIR/issue-65122-mac-invoc-in-mut-patterns.rs:6:13 | LL | let mut $eval = (); - | ^^^^^^^^^ help: remove the `mut` prefix: `does_not_exist!()` + | ^^^^ help: remove the `mut` prefix ... LL | mac1! { does_not_exist!() } | --------------------------- in this macro invocation @@ -25,7 +25,7 @@ error: `mut` must be followed by a named binding --> $DIR/issue-65122-mac-invoc-in-mut-patterns.rs:13:13 | LL | let mut $eval = (); - | ^^^ help: remove the `mut` prefix: `does_not_exist!()` + | ^^^ help: remove the `mut` prefix ... LL | mac2! { does_not_exist!() } | --------------------------- in this macro invocation diff --git a/tests/ui/parser/issues/issue-6610.stderr b/tests/ui/parser/issues/issue-6610.stderr index 4a3bc7525..83fc02996 100644 --- a/tests/ui/parser/issues/issue-6610.stderr +++ b/tests/ui/parser/issues/issue-6610.stderr @@ -6,5 +6,5 @@ LL | trait Foo { fn a() } | | | while parsing this `fn` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-66357-unexpected-unreachable.stderr b/tests/ui/parser/issues/issue-66357-unexpected-unreachable.stderr index 079fff37e..a265cbf70 100644 --- a/tests/ui/parser/issues/issue-66357-unexpected-unreachable.stderr +++ b/tests/ui/parser/issues/issue-66357-unexpected-unreachable.stderr @@ -7,5 +7,5 @@ LL | fn f() { |[](* } | | unclosed delimiter | closing delimiter possibly meant for this -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr b/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr index 6674b924e..2423a7526 100644 --- a/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr +++ b/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr @@ -6,5 +6,5 @@ LL | $($c)ö* {} | | | expected condition here -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr b/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr index 0b9c364f1..43047ff88 100644 --- a/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr +++ b/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr @@ -4,5 +4,5 @@ error: macro expansion ends with an incomplete expression: expected expression LL | $($c)ö* | ^ expected expression -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-68890.stderr b/tests/ui/parser/issues/issue-68890.stderr index 0d7b53a67..43ed69dcf 100644 --- a/tests/ui/parser/issues/issue-68890.stderr +++ b/tests/ui/parser/issues/issue-68890.stderr @@ -8,7 +8,11 @@ error: expected one of `)`, `+`, or `,`, found `a` --> $DIR/issue-68890.rs:1:15 | LL | enum e{A((?'a a+?+l))} - | ^ expected one of `)`, `+`, or `,` + | - ^ expected one of `)`, `+`, or `,` + | | + | while parsing this enum + | + = help: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }` error: expected item, found `)` --> $DIR/issue-68890.rs:1:21 diff --git a/tests/ui/parser/issues/issue-68987-unmatch-issue-1.stderr b/tests/ui/parser/issues/issue-68987-unmatch-issue-1.stderr index 2d873b461..5b5d45a7e 100644 --- a/tests/ui/parser/issues/issue-68987-unmatch-issue-1.stderr +++ b/tests/ui/parser/issues/issue-68987-unmatch-issue-1.stderr @@ -12,5 +12,5 @@ LL | } LL | } | ^ unexpected closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-68987-unmatch-issue.stderr b/tests/ui/parser/issues/issue-68987-unmatch-issue.stderr index cabd13324..782b85f09 100644 --- a/tests/ui/parser/issues/issue-68987-unmatch-issue.stderr +++ b/tests/ui/parser/issues/issue-68987-unmatch-issue.stderr @@ -12,5 +12,5 @@ LL | } LL | } | ^ unexpected closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-69259.stderr b/tests/ui/parser/issues/issue-69259.stderr index 604b7de33..a8487b5f4 100644 --- a/tests/ui/parser/issues/issue-69259.stderr +++ b/tests/ui/parser/issues/issue-69259.stderr @@ -4,5 +4,5 @@ error: unexpected closing delimiter: `)` LL | fn f) {} | ^ unexpected closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-70552-ascription-in-parens-after-call.stderr b/tests/ui/parser/issues/issue-70552-ascription-in-parens-after-call.stderr index f03c92e1b..14cf52ce6 100644 --- a/tests/ui/parser/issues/issue-70552-ascription-in-parens-after-call.stderr +++ b/tests/ui/parser/issues/issue-70552-ascription-in-parens-after-call.stderr @@ -4,5 +4,5 @@ error: expected expression, found `:` LL | expr as fun()(:); | ^ expected expression -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-70583-block-is-empty-1.stderr b/tests/ui/parser/issues/issue-70583-block-is-empty-1.stderr index 46cbb056d..c4621b2b8 100644 --- a/tests/ui/parser/issues/issue-70583-block-is-empty-1.stderr +++ b/tests/ui/parser/issues/issue-70583-block-is-empty-1.stderr @@ -9,5 +9,5 @@ LL | } LL | } | ^ unexpected closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-70583-block-is-empty-2.stderr b/tests/ui/parser/issues/issue-70583-block-is-empty-2.stderr index c590e04bb..a21cd4875 100644 --- a/tests/ui/parser/issues/issue-70583-block-is-empty-2.stderr +++ b/tests/ui/parser/issues/issue-70583-block-is-empty-2.stderr @@ -12,5 +12,5 @@ LL | ErrorHandled::Reported => {}} LL | } | ^ unexpected closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-72253.stderr b/tests/ui/parser/issues/issue-72253.stderr index 477fa09f4..c4fc662f5 100644 --- a/tests/ui/parser/issues/issue-72253.stderr +++ b/tests/ui/parser/issues/issue-72253.stderr @@ -6,5 +6,5 @@ LL | .arg("1") LL | ,arg("2") | ^ unexpected token -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-72373.stderr b/tests/ui/parser/issues/issue-72373.stderr index 0bb99a01e..c596c6abd 100644 --- a/tests/ui/parser/issues/issue-72373.stderr +++ b/tests/ui/parser/issues/issue-72373.stderr @@ -9,5 +9,5 @@ help: if you meant to bind the contents of the rest of the array pattern into `t LL | [h, ref ts @ ..] => foo(c, n - h) + foo(ts, n), | + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-76437-async.stderr b/tests/ui/parser/issues/issue-76437-async.stderr index 2c9c2a8cf..7f2df5c87 100644 --- a/tests/ui/parser/issues/issue-76437-async.stderr +++ b/tests/ui/parser/issues/issue-76437-async.stderr @@ -7,5 +7,5 @@ LL | async pub fn t() {} | | expected one of `extern`, `fn`, or `unsafe` | help: visibility `pub` must come before `async`: `pub async` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-76437-const-async-unsafe.stderr b/tests/ui/parser/issues/issue-76437-const-async-unsafe.stderr index 2e91beda1..a703fc4e8 100644 --- a/tests/ui/parser/issues/issue-76437-const-async-unsafe.stderr +++ b/tests/ui/parser/issues/issue-76437-const-async-unsafe.stderr @@ -7,5 +7,5 @@ LL | const async unsafe pub fn t() {} | | expected one of `extern` or `fn` | help: visibility `pub` must come before `const async unsafe`: `pub const async unsafe` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-76437-const-async.stderr b/tests/ui/parser/issues/issue-76437-const-async.stderr index 21b96c14d..a9acccdce 100644 --- a/tests/ui/parser/issues/issue-76437-const-async.stderr +++ b/tests/ui/parser/issues/issue-76437-const-async.stderr @@ -7,5 +7,5 @@ LL | const async pub fn t() {} | | expected one of `extern`, `fn`, or `unsafe` | help: visibility `pub` must come before `const async`: `pub const async` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-76437-const.stderr b/tests/ui/parser/issues/issue-76437-const.stderr index cf80d9a90..4c36d773d 100644 --- a/tests/ui/parser/issues/issue-76437-const.stderr +++ b/tests/ui/parser/issues/issue-76437-const.stderr @@ -7,5 +7,5 @@ LL | const pub fn t() {} | | expected one of `async`, `extern`, `fn`, or `unsafe` | help: visibility `pub` must come before `const`: `pub const` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.stderr b/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.stderr index fa8f13721..4ea76179b 100644 --- a/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.stderr +++ b/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.stderr @@ -7,5 +7,5 @@ LL | unsafe pub(crate) fn t() {} | | expected one of `extern` or `fn` | help: visibility `pub(crate)` must come before `unsafe`: `pub(crate) unsafe` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-76437-unsafe.stderr b/tests/ui/parser/issues/issue-76437-unsafe.stderr index c63292ef8..69f792775 100644 --- a/tests/ui/parser/issues/issue-76437-unsafe.stderr +++ b/tests/ui/parser/issues/issue-76437-unsafe.stderr @@ -7,5 +7,5 @@ LL | unsafe pub fn t() {} | | expected one of `extern` or `fn` | help: visibility `pub` must come before `unsafe`: `pub unsafe` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-76597.stderr b/tests/ui/parser/issues/issue-76597.stderr index 50b23329f..25858981c 100644 --- a/tests/ui/parser/issues/issue-76597.stderr +++ b/tests/ui/parser/issues/issue-76597.stderr @@ -9,5 +9,5 @@ LL | ... x: u8 LL | ... y: u8, | ^ unexpected token -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-7970b.stderr b/tests/ui/parser/issues/issue-7970b.stderr index a62226a8a..b23b09e75 100644 --- a/tests/ui/parser/issues/issue-7970b.stderr +++ b/tests/ui/parser/issues/issue-7970b.stderr @@ -4,5 +4,5 @@ error: unexpected end of macro invocation LL | macro_rules! test {} | ^^^^^^^^^^^^^^^^^^^^ missing tokens in macro arguments -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-81806.stderr b/tests/ui/parser/issues/issue-81806.stderr index 40873388d..f1287b82f 100644 --- a/tests/ui/parser/issues/issue-81806.stderr +++ b/tests/ui/parser/issues/issue-81806.stderr @@ -13,5 +13,5 @@ help: escape `impl` to use it as an identifier LL | r#impl | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-83639.stderr b/tests/ui/parser/issues/issue-83639.stderr index 4c10df191..87218a448 100644 --- a/tests/ui/parser/issues/issue-83639.stderr +++ b/tests/ui/parser/issues/issue-83639.stderr @@ -4,5 +4,5 @@ error: expected one of `.`, `;`, `?`, `}`, or an operator, found `" "` LL | """ " | ^^^^^^ expected one of `.`, `;`, `?`, `}`, or an operator -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-84104.stderr b/tests/ui/parser/issues/issue-84104.stderr index 7ad59f845..e866d3922 100644 --- a/tests/ui/parser/issues/issue-84104.stderr +++ b/tests/ui/parser/issues/issue-84104.stderr @@ -6,5 +6,5 @@ LL | #[i=i::<ښܖ< | | | unclosed delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-84148-2.stderr b/tests/ui/parser/issues/issue-84148-2.stderr index 20761180e..d9b6b336a 100644 --- a/tests/ui/parser/issues/issue-84148-2.stderr +++ b/tests/ui/parser/issues/issue-84148-2.stderr @@ -6,5 +6,5 @@ LL | fn f(t:for<>t? | | | unclosed delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-8537.stderr b/tests/ui/parser/issues/issue-8537.stderr index 523cc9dc5..0d636bd28 100644 --- a/tests/ui/parser/issues/issue-8537.stderr +++ b/tests/ui/parser/issues/issue-8537.stderr @@ -6,6 +6,6 @@ LL | "invalid-ab_isize" | = note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions. -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0703`. diff --git a/tests/ui/parser/issues/issue-86895.stderr b/tests/ui/parser/issues/issue-86895.stderr index 575d857c0..dcde7242d 100644 --- a/tests/ui/parser/issues/issue-86895.stderr +++ b/tests/ui/parser/issues/issue-86895.stderr @@ -4,5 +4,5 @@ error: expected one of `async`, `extern`, `fn`, or `unsafe`, found keyword `pub` LL | const pub () {} | ^^^ expected one of `async`, `extern`, `fn`, or `unsafe` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.stderr b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.stderr index e9eb14bf0..74989502e 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.stderr +++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.stderr @@ -9,5 +9,5 @@ LL | unsafe async fn test() {} | = note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.stderr b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.stderr index 0d2bc3472..5958f0c7d 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.stderr +++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.stderr @@ -9,5 +9,5 @@ LL | unsafe const fn test() {} | = note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.stderr b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.stderr index 4224713cc..0e9f7c51e 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.stderr +++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.stderr @@ -9,5 +9,5 @@ LL | extern unsafe fn test() {} | = note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-87694-duplicated-pub.stderr b/tests/ui/parser/issues/issue-87694-duplicated-pub.stderr index 8d242bc9d..a21023865 100644 --- a/tests/ui/parser/issues/issue-87694-duplicated-pub.stderr +++ b/tests/ui/parser/issues/issue-87694-duplicated-pub.stderr @@ -13,5 +13,5 @@ note: explicit visibility first seen here LL | pub const pub fn test() {} | ^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-87694-misplaced-pub.stderr b/tests/ui/parser/issues/issue-87694-misplaced-pub.stderr index 94c6a29ef..6f686a7e5 100644 --- a/tests/ui/parser/issues/issue-87694-misplaced-pub.stderr +++ b/tests/ui/parser/issues/issue-87694-misplaced-pub.stderr @@ -7,5 +7,5 @@ LL | const pub fn test() {} | | expected one of `async`, `extern`, `fn`, or `unsafe` | help: visibility `pub` must come before `const`: `pub const` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-87812-path.stderr b/tests/ui/parser/issues/issue-87812-path.stderr index d045f4821..fbe26ea39 100644 --- a/tests/ui/parser/issues/issue-87812-path.stderr +++ b/tests/ui/parser/issues/issue-87812-path.stderr @@ -11,6 +11,6 @@ LL | foo!(Baz); | = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/parser/issues/issue-87812.stderr b/tests/ui/parser/issues/issue-87812.stderr index d61ee23a5..35dc66a52 100644 --- a/tests/ui/parser/issues/issue-87812.stderr +++ b/tests/ui/parser/issues/issue-87812.stderr @@ -18,5 +18,5 @@ help: wrap this expression in parentheses LL | break '_l ($f); | + + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-88770.stderr b/tests/ui/parser/issues/issue-88770.stderr index 836f44953..60ef025fa 100644 --- a/tests/ui/parser/issues/issue-88770.stderr +++ b/tests/ui/parser/issues/issue-88770.stderr @@ -10,5 +10,5 @@ LL | fn m(){print!("",(c for&g LL | e | ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-88818.stderr b/tests/ui/parser/issues/issue-88818.stderr index 6e624c5a2..10e016106 100644 --- a/tests/ui/parser/issues/issue-88818.stderr +++ b/tests/ui/parser/issues/issue-88818.stderr @@ -14,5 +14,5 @@ LL - impl for S { } LL + impl S { } | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-89388.stderr b/tests/ui/parser/issues/issue-89388.stderr index 366d05c2d..d4987234a 100644 --- a/tests/ui/parser/issues/issue-89388.stderr +++ b/tests/ui/parser/issues/issue-89388.stderr @@ -9,5 +9,5 @@ help: types that don't start with an identifier need to be surrounded with angle LL | let _ = option.map(<[_]>::to_vec); | + + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-89574.stderr b/tests/ui/parser/issues/issue-89574.stderr index fb1312c78..5f8f6f939 100644 --- a/tests/ui/parser/issues/issue-89574.stderr +++ b/tests/ui/parser/issues/issue-89574.stderr @@ -4,5 +4,5 @@ error: missing type for `const` item LL | const EMPTY_ARRAY = []; | ^ help: provide a type for the item: `: <type>` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr index a5ee24445..51df17c7c 100644 --- a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr +++ b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.stderr @@ -14,5 +14,5 @@ LL - #![deny(missing_docs)] LL + #[deny(missing_docs)] | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-91421.stderr b/tests/ui/parser/issues/issue-91421.stderr index 2d9652051..99339a285 100644 --- a/tests/ui/parser/issues/issue-91421.stderr +++ b/tests/ui/parser/issues/issue-91421.stderr @@ -10,5 +10,5 @@ help: this binary operation is possibly unfinished LL | let value = if true && { | ^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-93867.stderr b/tests/ui/parser/issues/issue-93867.stderr index ee0cb4efd..c653c8dd4 100644 --- a/tests/ui/parser/issues/issue-93867.stderr +++ b/tests/ui/parser/issues/issue-93867.stderr @@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here LL | pub fn entry<'a, K, V>() -> Entry<'a> K, V> { | + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-98601-delimiter-error-1.stderr b/tests/ui/parser/issues/issue-98601-delimiter-error-1.stderr index d568a4c58..7dd059c6e 100644 --- a/tests/ui/parser/issues/issue-98601-delimiter-error-1.stderr +++ b/tests/ui/parser/issues/issue-98601-delimiter-error-1.stderr @@ -12,5 +12,5 @@ LL | } LL | } | ^ unexpected closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.stderr b/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.stderr index 81dd39bb7..5e4b4dd30 100644 --- a/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.stderr +++ b/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.stderr @@ -10,5 +10,5 @@ LL | LL | fn other(_: i32)) {} | ^ unexpected closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.stderr b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.stderr index edc640bf5..c503bc3cc 100644 --- a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.stderr +++ b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.stderr @@ -4,5 +4,5 @@ error: `enum` and `struct` are mutually exclusive LL | pub enum struct Range { | ^^^^^^^^^^^ help: replace `enum struct` with: `enum` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed b/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed new file mode 100644 index 000000000..7b73dfb02 --- /dev/null +++ b/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed @@ -0,0 +1,7 @@ +// run-rustfix +fn main() { + match 1 { + 1 => {} //~ ERROR + _ => { let _: u16 = 2u16; } //~ ERROR + } +} diff --git a/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs b/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs new file mode 100644 index 000000000..92143fcf3 --- /dev/null +++ b/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs @@ -0,0 +1,7 @@ +// run-rustfix +fn main() { + match 1 { + 1 >= {} //~ ERROR + _ => { let _: u16 = 2u8; } //~ ERROR + } +} diff --git a/tests/ui/parser/issues/recover-ge-as-fat-arrow.stderr b/tests/ui/parser/issues/recover-ge-as-fat-arrow.stderr new file mode 100644 index 000000000..2df5cca24 --- /dev/null +++ b/tests/ui/parser/issues/recover-ge-as-fat-arrow.stderr @@ -0,0 +1,25 @@ +error: expected one of `...`, `..=`, `..`, `=>`, `if`, or `|`, found `>=` + --> $DIR/recover-ge-as-fat-arrow.rs:4:11 + | +LL | 1 >= {} + | ^^ + | | + | expected one of `...`, `..=`, `..`, `=>`, `if`, or `|` + | help: use a fat arrow to start a match arm: `=>` + +error[E0308]: mismatched types + --> $DIR/recover-ge-as-fat-arrow.rs:5:29 + | +LL | _ => { let _: u16 = 2u8; } + | --- ^^^ expected `u16`, found `u8` + | | + | expected due to this + | +help: change the type of the numeric literal from `u8` to `u16` + | +LL | _ => { let _: u16 = 2u16; } + | ~~~ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/parser/keyword-abstract.stderr b/tests/ui/parser/keyword-abstract.stderr index b7d1ce7cd..156e098da 100644 --- a/tests/ui/parser/keyword-abstract.stderr +++ b/tests/ui/parser/keyword-abstract.stderr @@ -9,5 +9,5 @@ help: escape `abstract` to use it as an identifier LL | let r#abstract = (); | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-as-as-identifier.stderr b/tests/ui/parser/keyword-as-as-identifier.stderr index 3c5ad950d..bc654cbc7 100644 --- a/tests/ui/parser/keyword-as-as-identifier.stderr +++ b/tests/ui/parser/keyword-as-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `as` to use it as an identifier LL | let r#as = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-break-as-identifier.stderr b/tests/ui/parser/keyword-break-as-identifier.stderr index a4535eb40..63a9cbae5 100644 --- a/tests/ui/parser/keyword-break-as-identifier.stderr +++ b/tests/ui/parser/keyword-break-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `break` to use it as an identifier LL | let r#break = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-const-as-identifier.stderr b/tests/ui/parser/keyword-const-as-identifier.stderr index 31922f150..61e454174 100644 --- a/tests/ui/parser/keyword-const-as-identifier.stderr +++ b/tests/ui/parser/keyword-const-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `const` to use it as an identifier LL | let r#const = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-continue-as-identifier.stderr b/tests/ui/parser/keyword-continue-as-identifier.stderr index 81285633f..2519000d2 100644 --- a/tests/ui/parser/keyword-continue-as-identifier.stderr +++ b/tests/ui/parser/keyword-continue-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `continue` to use it as an identifier LL | let r#continue = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-else-as-identifier.stderr b/tests/ui/parser/keyword-else-as-identifier.stderr index 2125fe84a..e3eafa8fb 100644 --- a/tests/ui/parser/keyword-else-as-identifier.stderr +++ b/tests/ui/parser/keyword-else-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `else` to use it as an identifier LL | let r#else = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-enum-as-identifier.stderr b/tests/ui/parser/keyword-enum-as-identifier.stderr index 92d092ccb..280f8a2e1 100644 --- a/tests/ui/parser/keyword-enum-as-identifier.stderr +++ b/tests/ui/parser/keyword-enum-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `enum` to use it as an identifier LL | let r#enum = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-final.stderr b/tests/ui/parser/keyword-final.stderr index f1f9f2e2c..74866c9e7 100644 --- a/tests/ui/parser/keyword-final.stderr +++ b/tests/ui/parser/keyword-final.stderr @@ -9,5 +9,5 @@ help: escape `final` to use it as an identifier LL | let r#final = (); | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-fn-as-identifier.stderr b/tests/ui/parser/keyword-fn-as-identifier.stderr index 645efbcae..32fff1a61 100644 --- a/tests/ui/parser/keyword-fn-as-identifier.stderr +++ b/tests/ui/parser/keyword-fn-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `fn` to use it as an identifier LL | let r#fn = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-for-as-identifier.stderr b/tests/ui/parser/keyword-for-as-identifier.stderr index 26407cc4d..813bb3f3b 100644 --- a/tests/ui/parser/keyword-for-as-identifier.stderr +++ b/tests/ui/parser/keyword-for-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `for` to use it as an identifier LL | let r#for = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-if-as-identifier.stderr b/tests/ui/parser/keyword-if-as-identifier.stderr index 26f9a15a7..245ff8977 100644 --- a/tests/ui/parser/keyword-if-as-identifier.stderr +++ b/tests/ui/parser/keyword-if-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `if` to use it as an identifier LL | let r#if = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-impl-as-identifier.stderr b/tests/ui/parser/keyword-impl-as-identifier.stderr index 73a50bc38..fe840ba3d 100644 --- a/tests/ui/parser/keyword-impl-as-identifier.stderr +++ b/tests/ui/parser/keyword-impl-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `impl` to use it as an identifier LL | let r#impl = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-in-as-identifier.stderr b/tests/ui/parser/keyword-in-as-identifier.stderr index 98332b723..12fc0479f 100644 --- a/tests/ui/parser/keyword-in-as-identifier.stderr +++ b/tests/ui/parser/keyword-in-as-identifier.stderr @@ -4,5 +4,5 @@ error: expected pattern, found keyword `in` LL | let in = "foo"; | ^^ expected pattern -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-let-as-identifier.stderr b/tests/ui/parser/keyword-let-as-identifier.stderr index 86faaed38..69f570aa8 100644 --- a/tests/ui/parser/keyword-let-as-identifier.stderr +++ b/tests/ui/parser/keyword-let-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `let` to use it as an identifier LL | let r#let = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-loop-as-identifier.stderr b/tests/ui/parser/keyword-loop-as-identifier.stderr index 304ad61cc..ff14af0c7 100644 --- a/tests/ui/parser/keyword-loop-as-identifier.stderr +++ b/tests/ui/parser/keyword-loop-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `loop` to use it as an identifier LL | let r#loop = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-match-as-identifier.stderr b/tests/ui/parser/keyword-match-as-identifier.stderr index 25ac397fb..3811ef058 100644 --- a/tests/ui/parser/keyword-match-as-identifier.stderr +++ b/tests/ui/parser/keyword-match-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `match` to use it as an identifier LL | let r#match = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-mod-as-identifier.stderr b/tests/ui/parser/keyword-mod-as-identifier.stderr index d5688e871..c60d6f129 100644 --- a/tests/ui/parser/keyword-mod-as-identifier.stderr +++ b/tests/ui/parser/keyword-mod-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `mod` to use it as an identifier LL | let r#mod = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-move-as-identifier.stderr b/tests/ui/parser/keyword-move-as-identifier.stderr index 75653cffc..91cded8e9 100644 --- a/tests/ui/parser/keyword-move-as-identifier.stderr +++ b/tests/ui/parser/keyword-move-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `move` to use it as an identifier LL | let r#move = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-mut-as-identifier.stderr b/tests/ui/parser/keyword-mut-as-identifier.stderr index 040960835..335b31a20 100644 --- a/tests/ui/parser/keyword-mut-as-identifier.stderr +++ b/tests/ui/parser/keyword-mut-as-identifier.stderr @@ -4,5 +4,5 @@ error: expected identifier, found `=` LL | let mut = "foo"; | ^ expected identifier -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-override.stderr b/tests/ui/parser/keyword-override.stderr index cdb573686..108a621a2 100644 --- a/tests/ui/parser/keyword-override.stderr +++ b/tests/ui/parser/keyword-override.stderr @@ -9,5 +9,5 @@ help: escape `override` to use it as an identifier LL | let r#override = (); | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-pub-as-identifier.stderr b/tests/ui/parser/keyword-pub-as-identifier.stderr index 8d513507c..ec62fd4cf 100644 --- a/tests/ui/parser/keyword-pub-as-identifier.stderr +++ b/tests/ui/parser/keyword-pub-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `pub` to use it as an identifier LL | let r#pub = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-ref-as-identifier.stderr b/tests/ui/parser/keyword-ref-as-identifier.stderr index 618043d89..54c258d7a 100644 --- a/tests/ui/parser/keyword-ref-as-identifier.stderr +++ b/tests/ui/parser/keyword-ref-as-identifier.stderr @@ -4,5 +4,5 @@ error: expected identifier, found `=` LL | let ref = "foo"; | ^ expected identifier -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-return-as-identifier.stderr b/tests/ui/parser/keyword-return-as-identifier.stderr index eeb8e468b..9e41d0ccb 100644 --- a/tests/ui/parser/keyword-return-as-identifier.stderr +++ b/tests/ui/parser/keyword-return-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `return` to use it as an identifier LL | let r#return = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-static-as-identifier.stderr b/tests/ui/parser/keyword-static-as-identifier.stderr index a3213e2f2..76fb3afd6 100644 --- a/tests/ui/parser/keyword-static-as-identifier.stderr +++ b/tests/ui/parser/keyword-static-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `static` to use it as an identifier LL | let r#static = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-struct-as-identifier.stderr b/tests/ui/parser/keyword-struct-as-identifier.stderr index b73361a55..89eb644e1 100644 --- a/tests/ui/parser/keyword-struct-as-identifier.stderr +++ b/tests/ui/parser/keyword-struct-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `struct` to use it as an identifier LL | let r#struct = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-trait-as-identifier.stderr b/tests/ui/parser/keyword-trait-as-identifier.stderr index 56ef5f606..3f19f6f3c 100644 --- a/tests/ui/parser/keyword-trait-as-identifier.stderr +++ b/tests/ui/parser/keyword-trait-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `trait` to use it as an identifier LL | let r#trait = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-try-as-identifier-edition2018.stderr b/tests/ui/parser/keyword-try-as-identifier-edition2018.stderr index 94a106d47..ded652302 100644 --- a/tests/ui/parser/keyword-try-as-identifier-edition2018.stderr +++ b/tests/ui/parser/keyword-try-as-identifier-edition2018.stderr @@ -9,5 +9,5 @@ help: escape `try` to use it as an identifier LL | let r#try = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-type-as-identifier.stderr b/tests/ui/parser/keyword-type-as-identifier.stderr index 624c1006b..5e6c6d9e1 100644 --- a/tests/ui/parser/keyword-type-as-identifier.stderr +++ b/tests/ui/parser/keyword-type-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `type` to use it as an identifier LL | let r#type = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-typeof.stderr b/tests/ui/parser/keyword-typeof.stderr index 4c5324505..c671ba94c 100644 --- a/tests/ui/parser/keyword-typeof.stderr +++ b/tests/ui/parser/keyword-typeof.stderr @@ -9,5 +9,5 @@ help: escape `typeof` to use it as an identifier LL | let r#typeof = (); | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-unsafe-as-identifier.stderr b/tests/ui/parser/keyword-unsafe-as-identifier.stderr index b552c9cd3..25a8001c6 100644 --- a/tests/ui/parser/keyword-unsafe-as-identifier.stderr +++ b/tests/ui/parser/keyword-unsafe-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `unsafe` to use it as an identifier LL | let r#unsafe = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-use-as-identifier.stderr b/tests/ui/parser/keyword-use-as-identifier.stderr index 630798659..26bf2b4f6 100644 --- a/tests/ui/parser/keyword-use-as-identifier.stderr +++ b/tests/ui/parser/keyword-use-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `use` to use it as an identifier LL | let r#use = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-where-as-identifier.stderr b/tests/ui/parser/keyword-where-as-identifier.stderr index 9e72f7940..5243f0488 100644 --- a/tests/ui/parser/keyword-where-as-identifier.stderr +++ b/tests/ui/parser/keyword-where-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `where` to use it as an identifier LL | let r#where = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword-while-as-identifier.stderr b/tests/ui/parser/keyword-while-as-identifier.stderr index 2bb62105d..ea396c613 100644 --- a/tests/ui/parser/keyword-while-as-identifier.stderr +++ b/tests/ui/parser/keyword-while-as-identifier.stderr @@ -9,5 +9,5 @@ help: escape `while` to use it as an identifier LL | let r#while = "foo"; | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/keyword.stderr b/tests/ui/parser/keyword.stderr index ee7d72b39..54539519e 100644 --- a/tests/ui/parser/keyword.stderr +++ b/tests/ui/parser/keyword.stderr @@ -9,5 +9,5 @@ help: escape `break` to use it as an identifier LL | pub mod r#break { | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/lifetime-semicolon.stderr b/tests/ui/parser/lifetime-semicolon.stderr index ee486c236..4f8e2835e 100644 --- a/tests/ui/parser/lifetime-semicolon.stderr +++ b/tests/ui/parser/lifetime-semicolon.stderr @@ -9,5 +9,5 @@ help: use a comma to separate type parameters LL | fn foo<'a, 'b>(_x: &mut Foo<'a, 'b>) {} | ~ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/lit-err-in-macro.stderr b/tests/ui/parser/lit-err-in-macro.stderr index a61fb5c85..12e6d5190 100644 --- a/tests/ui/parser/lit-err-in-macro.stderr +++ b/tests/ui/parser/lit-err-in-macro.stderr @@ -4,5 +4,5 @@ error: suffixes on string literals are invalid LL | f!("Foo"__); | ^^^^^^^ invalid suffix `__` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/macro-bad-delimiter-ident.stderr b/tests/ui/parser/macro-bad-delimiter-ident.stderr index f2365fed2..06f72cdec 100644 --- a/tests/ui/parser/macro-bad-delimiter-ident.stderr +++ b/tests/ui/parser/macro-bad-delimiter-ident.stderr @@ -4,5 +4,5 @@ error: expected one of `(`, `[`, or `{`, found `bar` LL | foo! bar < | ^^^ expected one of `(`, `[`, or `{` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/macro-keyword.stderr b/tests/ui/parser/macro-keyword.stderr index d794671f8..bfe89e320 100644 --- a/tests/ui/parser/macro-keyword.stderr +++ b/tests/ui/parser/macro-keyword.stderr @@ -9,5 +9,5 @@ help: escape `macro` to use it as an identifier LL | fn r#macro() { | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/macro-mismatched-delim-brace-paren.stderr b/tests/ui/parser/macro-mismatched-delim-brace-paren.stderr index 077d31800..f9a307222 100644 --- a/tests/ui/parser/macro-mismatched-delim-brace-paren.stderr +++ b/tests/ui/parser/macro-mismatched-delim-brace-paren.stderr @@ -7,5 +7,5 @@ LL | bar, "baz", 1, 2.0 LL | ) | ^ mismatched closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/macro/bad-macro-argument.stderr b/tests/ui/parser/macro/bad-macro-argument.stderr index 3cd8accb6..ba6499d71 100644 --- a/tests/ui/parser/macro/bad-macro-argument.stderr +++ b/tests/ui/parser/macro/bad-macro-argument.stderr @@ -4,5 +4,5 @@ error: expected expression, found end of macro arguments LL | println!("Hello, {}", message/); | ^ expected expression -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/macro/issue-37113.stderr b/tests/ui/parser/macro/issue-37113.stderr index da9e743a0..1f2fe2310 100644 --- a/tests/ui/parser/macro/issue-37113.stderr +++ b/tests/ui/parser/macro/issue-37113.stderr @@ -12,5 +12,5 @@ LL | test_macro!(String,); = help: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }` = note: this error originates in the macro `test_macro` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/macro/issue-37234.stderr b/tests/ui/parser/macro/issue-37234.stderr index d79196204..cd91ea441 100644 --- a/tests/ui/parser/macro/issue-37234.stderr +++ b/tests/ui/parser/macro/issue-37234.stderr @@ -9,5 +9,5 @@ LL | failed!(); | = note: this error originates in the macro `failed` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/macro/macro-doc-comments-1.stderr b/tests/ui/parser/macro/macro-doc-comments-1.stderr index eaeb62d2c..9d2d1bc00 100644 --- a/tests/ui/parser/macro/macro-doc-comments-1.stderr +++ b/tests/ui/parser/macro/macro-doc-comments-1.stderr @@ -16,5 +16,5 @@ note: while trying to match `[` LL | (#[$outer:meta]) => () | ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/macro/macro-doc-comments-2.stderr b/tests/ui/parser/macro/macro-doc-comments-2.stderr index 1dcd95f6f..22efd995b 100644 --- a/tests/ui/parser/macro/macro-doc-comments-2.stderr +++ b/tests/ui/parser/macro/macro-doc-comments-2.stderr @@ -16,5 +16,5 @@ note: while trying to match `!` LL | (#![$inner:meta]) => () | ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/macro/macro-expand-to-match-arm.rs b/tests/ui/parser/macro/macro-expand-to-match-arm.rs index 39d1d065e..db38fa0d7 100644 --- a/tests/ui/parser/macro/macro-expand-to-match-arm.rs +++ b/tests/ui/parser/macro/macro-expand-to-match-arm.rs @@ -1,6 +1,9 @@ macro_rules! arm { ($pattern:pat => $block:block) => { $pattern => $block + //~^ ERROR macro expansion ignores token `=>` and any following + //~| NOTE the usage of `arm!` is likely invalid in pattern context + //~| NOTE macros cannot expand to match arms }; } @@ -9,9 +12,8 @@ fn main() { match x { Some(1) => {}, arm!(None => {}), - //~^ NOTE macros cannot expand to match arms - //~| ERROR unexpected `,` in pattern - // doesn't recover + //~^ NOTE caused by the macro expansion here + //~| ERROR `match` arm with no body Some(2) => {}, _ => {}, }; diff --git a/tests/ui/parser/macro/macro-expand-to-match-arm.stderr b/tests/ui/parser/macro/macro-expand-to-match-arm.stderr index 1a5f46968..e3e7ff89c 100644 --- a/tests/ui/parser/macro/macro-expand-to-match-arm.stderr +++ b/tests/ui/parser/macro/macro-expand-to-match-arm.stderr @@ -1,10 +1,20 @@ -error: unexpected `,` in pattern - --> $DIR/macro-expand-to-match-arm.rs:11:25 +error: macro expansion ignores token `=>` and any following + --> $DIR/macro-expand-to-match-arm.rs:3:18 | +LL | $pattern => $block + | ^^ +... LL | arm!(None => {}), - | ^ + | ---------------- caused by the macro expansion here | + = note: the usage of `arm!` is likely invalid in pattern context = note: macros cannot expand to match arms -error: aborting due to previous error +error: `match` arm with no body + --> $DIR/macro-expand-to-match-arm.rs:14:9 + | +LL | arm!(None => {}), + | ^^^^^^^^^^^^^^^^- help: add a body after the pattern: `=> todo!(),` + +error: aborting due to 2 previous errors diff --git a/tests/ui/parser/match-arm-without-body.rs b/tests/ui/parser/match-arm-without-body.rs new file mode 100644 index 000000000..4723abff8 --- /dev/null +++ b/tests/ui/parser/match-arm-without-body.rs @@ -0,0 +1,77 @@ +macro_rules! pat { + () => { Some(_) } +} + +fn main() { + match Some(false) { + Some(_) + //~^ ERROR `match` arm with no body + //~| HELP add a body after the pattern + } + match Some(false) { + Some(_) + _ => {} + //~^ ERROR expected one of + } + match Some(false) { + Some(_), + //~^ ERROR unexpected `,` in pattern + //~| HELP try adding parentheses to match on a tuple + //~| HELP or a vertical bar to match on multiple alternatives + } + match Some(false) { + Some(_), + //~^ ERROR unexpected `,` in pattern + //~| HELP try adding parentheses to match on a tuple + //~| HELP or a vertical bar to match on multiple alternatives + _ => {} + } + match Some(false) { + Some(_) if true + //~^ ERROR `match` arm with no body + //~| HELP add a body after the pattern + } + match Some(false) { + Some(_) if true + _ => {} + //~^ ERROR expected one of + } + match Some(false) { + Some(_) if true, + //~^ ERROR `match` arm with no body + //~| HELP add a body after the pattern + } + match Some(false) { + Some(_) if true, + //~^ ERROR `match` arm with no body + //~| HELP add a body after the pattern + _ => {} + } + match Some(false) { + pat!() + //~^ ERROR `match` arm with no body + //~| HELP add a body after the pattern + } + match Some(false) { + pat!(), + //~^ ERROR `match` arm with no body + //~| HELP add a body after the pattern + } + match Some(false) { + pat!() if true, + //~^ ERROR `match` arm with no body + //~| HELP add a body after the pattern + } + match Some(false) { + pat!() + //~^ ERROR expected `,` following `match` arm + //~| HELP missing a comma here + _ => {} + } + match Some(false) { + pat!(), + //~^ ERROR `match` arm with no body + //~| HELP add a body after the pattern + _ => {} + } +} diff --git a/tests/ui/parser/match-arm-without-body.stderr b/tests/ui/parser/match-arm-without-body.stderr new file mode 100644 index 000000000..d98c7ec28 --- /dev/null +++ b/tests/ui/parser/match-arm-without-body.stderr @@ -0,0 +1,110 @@ +error: expected one of `,`, `=>`, `if`, `|`, or `}`, found reserved identifier `_` + --> $DIR/match-arm-without-body.rs:13:9 + | +LL | Some(_) + | - expected one of `,`, `=>`, `if`, `|`, or `}` +LL | _ => {} + | ^ unexpected token + +error: unexpected `,` in pattern + --> $DIR/match-arm-without-body.rs:17:16 + | +LL | Some(_), + | ^ + | +help: try adding parentheses to match on a tuple... + | +LL | (Some(_),) + | + + +help: ...or a vertical bar to match on multiple alternatives + | +LL | Some(_) | + | + +error: unexpected `,` in pattern + --> $DIR/match-arm-without-body.rs:23:16 + | +LL | Some(_), + | ^ + | +help: try adding parentheses to match on a tuple... + | +LL ~ (Some(_), +LL | +LL | +LL | +LL ~ _) => {} + | +help: ...or a vertical bar to match on multiple alternatives + | +LL ~ Some(_) | +LL + +LL + +LL + +LL ~ _ => {} + | + +error: expected one of `,`, `.`, `=>`, `?`, `}`, or an operator, found reserved identifier `_` + --> $DIR/match-arm-without-body.rs:36:9 + | +LL | Some(_) if true + | - expected one of `,`, `.`, `=>`, `?`, `}`, or an operator +LL | _ => {} + | ^ unexpected token + +error: expected `,` following `match` arm + --> $DIR/match-arm-without-body.rs:66:15 + | +LL | pat!() + | ^ help: missing a comma here to end this `match` arm: `,` + +error: `match` arm with no body + --> $DIR/match-arm-without-body.rs:7:9 + | +LL | Some(_) + | ^^^^^^^- help: add a body after the pattern: `=> todo!(),` + +error: `match` arm with no body + --> $DIR/match-arm-without-body.rs:30:9 + | +LL | Some(_) if true + | ^^^^^^^- help: add a body after the pattern: `=> todo!(),` + +error: `match` arm with no body + --> $DIR/match-arm-without-body.rs:40:9 + | +LL | Some(_) if true, + | ^^^^^^^- help: add a body after the pattern: `=> todo!(),` + +error: `match` arm with no body + --> $DIR/match-arm-without-body.rs:45:9 + | +LL | Some(_) if true, + | ^^^^^^^- help: add a body after the pattern: `=> todo!(),` + +error: `match` arm with no body + --> $DIR/match-arm-without-body.rs:51:9 + | +LL | pat!() + | ^^^^^^- help: add a body after the pattern: `=> todo!(),` + +error: `match` arm with no body + --> $DIR/match-arm-without-body.rs:56:9 + | +LL | pat!(), + | ^^^^^^- help: add a body after the pattern: `=> todo!(),` + +error: `match` arm with no body + --> $DIR/match-arm-without-body.rs:61:9 + | +LL | pat!() if true, + | ^^^^^^- help: add a body after the pattern: `=> todo!(),` + +error: `match` arm with no body + --> $DIR/match-arm-without-body.rs:72:9 + | +LL | pat!(), + | ^^^^^^- help: add a body after the pattern: `=> todo!(),` + +error: aborting due to 13 previous errors + diff --git a/tests/ui/parser/match-arrows-block-then-binop.stderr b/tests/ui/parser/match-arrows-block-then-binop.stderr index cb361a3db..7ef5228a8 100644 --- a/tests/ui/parser/match-arrows-block-then-binop.stderr +++ b/tests/ui/parser/match-arrows-block-then-binop.stderr @@ -11,5 +11,5 @@ LL | 0 LL ~ }) + 5 | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/match-refactor-to-expr.stderr b/tests/ui/parser/match-refactor-to-expr.stderr index 851bef8f2..72dfcd7dd 100644 --- a/tests/ui/parser/match-refactor-to-expr.stderr +++ b/tests/ui/parser/match-refactor-to-expr.stderr @@ -12,5 +12,5 @@ LL | LL | ; | ^ unexpected token -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/mbe_missing_right_paren.stderr b/tests/ui/parser/mbe_missing_right_paren.stderr index d2af94683..d45a2e3ab 100644 --- a/tests/ui/parser/mbe_missing_right_paren.stderr +++ b/tests/ui/parser/mbe_missing_right_paren.stderr @@ -6,5 +6,5 @@ LL | macro_rules! abc(ؼ | | | unclosed delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/method-call-on-struct-literal-in-if-condition.stderr b/tests/ui/parser/method-call-on-struct-literal-in-if-condition.stderr index dedbad909..f7822ba11 100644 --- a/tests/ui/parser/method-call-on-struct-literal-in-if-condition.stderr +++ b/tests/ui/parser/method-call-on-struct-literal-in-if-condition.stderr @@ -9,5 +9,5 @@ help: you might need to surround the struct literal with parentheses LL | if (Example { a: one(), }).is_pos() { | + + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr b/tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr index d91a7f054..97aac661d 100644 --- a/tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr +++ b/tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr @@ -7,5 +7,5 @@ LL | impl T for () { LL | | ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/mismatched-braces/missing-close-brace-in-struct.stderr b/tests/ui/parser/mismatched-braces/missing-close-brace-in-struct.stderr index d01d9ed60..f70dac443 100644 --- a/tests/ui/parser/mismatched-braces/missing-close-brace-in-struct.stderr +++ b/tests/ui/parser/mismatched-braces/missing-close-brace-in-struct.stderr @@ -7,5 +7,5 @@ LL | pub(crate) struct Bar<T> { LL | fn main() {} | ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr b/tests/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr index 7418dd64c..a565ad49b 100644 --- a/tests/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr +++ b/tests/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr @@ -7,5 +7,5 @@ LL | trait T { LL | fn main() {} | ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/mismatched-delim-brace-empty-block.stderr b/tests/ui/parser/mismatched-delim-brace-empty-block.stderr index 165eb8ae9..180798788 100644 --- a/tests/ui/parser/mismatched-delim-brace-empty-block.stderr +++ b/tests/ui/parser/mismatched-delim-brace-empty-block.stderr @@ -10,5 +10,5 @@ LL | let _ = (); LL | } | ^ unexpected closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.stderr b/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.stderr index b2448774a..e40d98582 100644 --- a/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.stderr +++ b/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.stderr @@ -2,9 +2,8 @@ error: expected one of `,`, `:`, or `>`, found `=` --> $DIR/missing-closing-angle-bracket-eq-constraint.rs:7:23 | LL | let v : Vec<(u32,_) = vec![]; - | - - ^ expected one of `,`, `:`, or `>` - | | | - | | maybe try to close unmatched angle bracket + | - ^ expected one of `,`, `:`, or `>` + | | | while parsing the type for `v` | help: you might have meant to end the type parameters here @@ -29,9 +28,8 @@ error: expected one of `,`, `:`, or `>`, found `=` --> $DIR/missing-closing-angle-bracket-eq-constraint.rs:18:18 | LL | let v : Vec<'a = vec![]; - | - -- ^ expected one of `,`, `:`, or `>` - | | | - | | maybe try to close unmatched angle bracket + | - ^ expected one of `,`, `:`, or `>` + | | | while parsing the type for `v` | help: you might have meant to end the type parameters here diff --git a/tests/ui/parser/missing-closing-angle-bracket-struct-field-ty.stderr b/tests/ui/parser/missing-closing-angle-bracket-struct-field-ty.stderr index 6d8b0c3fc..29a5dbb73 100644 --- a/tests/ui/parser/missing-closing-angle-bracket-struct-field-ty.stderr +++ b/tests/ui/parser/missing-closing-angle-bracket-struct-field-ty.stderr @@ -14,5 +14,5 @@ help: you might have meant to end the type parameters here LL | b: Arc<Mutex<usize>>, | + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/missing-expression-in-for-loop.stderr b/tests/ui/parser/missing-expression-in-for-loop.stderr index 74a7c4224..74acfc829 100644 --- a/tests/ui/parser/missing-expression-in-for-loop.stderr +++ b/tests/ui/parser/missing-expression-in-for-loop.stderr @@ -9,5 +9,5 @@ help: try adding an expression to the `for` loop LL | for i in /* expression */ { | ++++++++++++++++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/missing-semicolon.stderr b/tests/ui/parser/missing-semicolon.stderr index e0d5e84ec..4108cced3 100644 --- a/tests/ui/parser/missing-semicolon.stderr +++ b/tests/ui/parser/missing-semicolon.stderr @@ -9,5 +9,5 @@ LL | fn main() { m!(0, 0; 0, 0); } | = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/missing_right_paren.rs b/tests/ui/parser/missing_right_paren.rs index e240f8c67..cc6d30c9c 100644 --- a/tests/ui/parser/missing_right_paren.rs +++ b/tests/ui/parser/missing_right_paren.rs @@ -1,4 +1,4 @@ // ignore-tidy-trailing-newlines // error-pattern: this file contains an unclosed delimiter -// error-pattern: aborting due to previous error +// error-pattern: aborting due to 1 previous error fn main((ؼ
\ No newline at end of file diff --git a/tests/ui/parser/missing_right_paren.stderr b/tests/ui/parser/missing_right_paren.stderr index 994ce4d85..4815f04fb 100644 --- a/tests/ui/parser/missing_right_paren.stderr +++ b/tests/ui/parser/missing_right_paren.stderr @@ -7,5 +7,5 @@ LL | fn main((ؼ | |unclosed delimiter | unclosed delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-macro-rules.stderr b/tests/ui/parser/misspelled-macro-rules.stderr index 56df71238..fc718d855 100644 --- a/tests/ui/parser/misspelled-macro-rules.stderr +++ b/tests/ui/parser/misspelled-macro-rules.stderr @@ -6,5 +6,5 @@ LL | marco_rules! thing { | | | help: perhaps you meant to define a macro: `macro_rules` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/mod_file_with_path_attr.stderr b/tests/ui/parser/mod_file_with_path_attr.stderr index cd1add73d..9ccb775da 100644 --- a/tests/ui/parser/mod_file_with_path_attr.stderr +++ b/tests/ui/parser/mod_file_with_path_attr.stderr @@ -4,5 +4,5 @@ error: couldn't read $DIR/not_a_real_file.rs: $FILE_NOT_FOUND_MSG (os error 2) LL | mod m; | ^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/multiline-comment-line-tracking.stderr b/tests/ui/parser/multiline-comment-line-tracking.stderr index cac0c801a..450a91207 100644 --- a/tests/ui/parser/multiline-comment-line-tracking.stderr +++ b/tests/ui/parser/multiline-comment-line-tracking.stderr @@ -4,5 +4,5 @@ error: expected expression, found `%` LL | %; | ^ expected expression -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/multitrait.stderr b/tests/ui/parser/multitrait.stderr index 5a8bb2f7a..6100f64e3 100644 --- a/tests/ui/parser/multitrait.stderr +++ b/tests/ui/parser/multitrait.stderr @@ -4,5 +4,5 @@ error: expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found ` LL | impl Cmp, ToString for S { | ^ expected one of 8 possible tokens -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/mut-patterns.rs b/tests/ui/parser/mut-patterns.rs index 8b83d6ab2..f2d2df0af 100644 --- a/tests/ui/parser/mut-patterns.rs +++ b/tests/ui/parser/mut-patterns.rs @@ -27,7 +27,7 @@ pub fn main() { struct r#yield(u8, u8); let mut mut yield(become, await) = r#yield(0, 0); //~^ ERROR `mut` on a binding may not be repeated - //~| ERROR `mut` must be attached to each individual binding + //~| ERROR `mut` must be followed by a named binding //~| ERROR expected identifier, found reserved keyword `yield` //~| ERROR expected identifier, found reserved keyword `become` //~| ERROR expected identifier, found keyword `await` diff --git a/tests/ui/parser/mut-patterns.stderr b/tests/ui/parser/mut-patterns.stderr index f179d8c9e..6559cf09c 100644 --- a/tests/ui/parser/mut-patterns.stderr +++ b/tests/ui/parser/mut-patterns.stderr @@ -2,7 +2,7 @@ error: `mut` must be followed by a named binding --> $DIR/mut-patterns.rs:9:9 | LL | let mut _ = 0; - | ^^^^^ help: remove the `mut` prefix: `_` + | ^^^^ help: remove the `mut` prefix | = note: `mut` may be followed by `variable` and `variable @ pattern` @@ -10,7 +10,7 @@ error: `mut` must be followed by a named binding --> $DIR/mut-patterns.rs:10:9 | LL | let mut (_, _) = (0, 0); - | ^^^^^^^^^^ help: remove the `mut` prefix: `(_, _)` + | ^^^^ help: remove the `mut` prefix | = note: `mut` may be followed by `variable` and `variable @ pattern` @@ -83,11 +83,11 @@ help: escape `await` to use it as an identifier LL | let mut mut yield(become, r#await) = r#yield(0, 0); | ++ -error: `mut` must be attached to each individual binding +error: `mut` must be followed by a named binding --> $DIR/mut-patterns.rs:28:9 | LL | let mut mut yield(become, await) = r#yield(0, 0); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `r#yield(mut r#become, mut r#await)` + | ^^^^^^^^ help: remove the `mut` prefix | = note: `mut` may be followed by `variable` and `variable @ pattern` diff --git a/tests/ui/parser/nested-bad-turbofish.stderr b/tests/ui/parser/nested-bad-turbofish.stderr index d82fa80e5..a23c23c41 100644 --- a/tests/ui/parser/nested-bad-turbofish.stderr +++ b/tests/ui/parser/nested-bad-turbofish.stderr @@ -7,5 +7,5 @@ LL | foo<<S as T>::V>(); = help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments = help: or use `(...)` if you meant to specify fn arguments -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/nested-missing-closing-angle-bracket.stderr b/tests/ui/parser/nested-missing-closing-angle-bracket.stderr index b85bc0256..8d69125f8 100644 --- a/tests/ui/parser/nested-missing-closing-angle-bracket.stderr +++ b/tests/ui/parser/nested-missing-closing-angle-bracket.stderr @@ -4,5 +4,5 @@ error: expected one of `,` or `>`, found `;` LL | let v : Vec::<Vec<(u32,_,_)> = vec![vec![]]; | - while parsing the type for `v` ^ expected one of `,` or `>` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/new-unicode-escapes-1.stderr b/tests/ui/parser/new-unicode-escapes-1.stderr index d133e46b4..491915c89 100644 --- a/tests/ui/parser/new-unicode-escapes-1.stderr +++ b/tests/ui/parser/new-unicode-escapes-1.stderr @@ -9,5 +9,5 @@ help: terminate the unicode escape LL | let s = "\u{2603}"; | + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/new-unicode-escapes-2.stderr b/tests/ui/parser/new-unicode-escapes-2.stderr index 2f3f8c0f9..e0bdf533d 100644 --- a/tests/ui/parser/new-unicode-escapes-2.stderr +++ b/tests/ui/parser/new-unicode-escapes-2.stderr @@ -4,5 +4,5 @@ error: overlong unicode escape LL | let s = "\u{260311111111}"; | ^^^^^^^^^^^^^^^^ must have at most 6 hex digits -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/new-unicode-escapes-4.stderr b/tests/ui/parser/new-unicode-escapes-4.stderr index 514591af1..d62afee7f 100644 --- a/tests/ui/parser/new-unicode-escapes-4.stderr +++ b/tests/ui/parser/new-unicode-escapes-4.stderr @@ -4,5 +4,5 @@ error: invalid character in unicode escape: `l` LL | let s = "\u{lol}"; | ^ invalid character in unicode escape -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/obsolete-syntax-impl-for-dotdot.stderr b/tests/ui/parser/obsolete-syntax-impl-for-dotdot.stderr index b7108ced0..d5f404bed 100644 --- a/tests/ui/parser/obsolete-syntax-impl-for-dotdot.stderr +++ b/tests/ui/parser/obsolete-syntax-impl-for-dotdot.stderr @@ -6,5 +6,5 @@ LL | impl Trait2 for .. {} | = help: use `auto trait Trait {}` instead -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/omitted-arg-in-item-fn.stderr b/tests/ui/parser/omitted-arg-in-item-fn.stderr index ce2eab051..6f2a9f64c 100644 --- a/tests/ui/parser/omitted-arg-in-item-fn.stderr +++ b/tests/ui/parser/omitted-arg-in-item-fn.stderr @@ -18,5 +18,5 @@ help: if this is a type, explicitly ignore the parameter name LL | fn foo(_: x) { | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/paamayim-nekudotayim.stderr b/tests/ui/parser/paamayim-nekudotayim.stderr index 6ceba07f4..7d40cd63f 100644 --- a/tests/ui/parser/paamayim-nekudotayim.stderr +++ b/tests/ui/parser/paamayim-nekudotayim.stderr @@ -4,5 +4,5 @@ error: expected identifier, found `;` LL | ::; | ^ expected identifier -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/parser-recovery-1.stderr b/tests/ui/parser/parser-recovery-1.stderr index 7045b6f5b..8162db3d8 100644 --- a/tests/ui/parser/parser-recovery-1.stderr +++ b/tests/ui/parser/parser-recovery-1.stderr @@ -12,5 +12,5 @@ LL | } LL | } | ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/parser-recovery-2.stderr b/tests/ui/parser/parser-recovery-2.stderr index f396e5fde..d3d6c9b08 100644 --- a/tests/ui/parser/parser-recovery-2.stderr +++ b/tests/ui/parser/parser-recovery-2.stderr @@ -7,5 +7,5 @@ LL | let x = foo(); LL | ) | ^ mismatched closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/pat-lt-bracket-1.rs b/tests/ui/parser/pat-lt-bracket-1.rs index 2e2001434..33da15adb 100644 --- a/tests/ui/parser/pat-lt-bracket-1.rs +++ b/tests/ui/parser/pat-lt-bracket-1.rs @@ -1,7 +1,7 @@ fn main() { match 42 { x < 7 => (), - //~^ error: expected one of `=>`, `@`, `if`, or `|`, found `<` + //~^ error: expected one of `,`, `=>`, `@`, `if`, `|`, or `}`, found `<` _ => () } } diff --git a/tests/ui/parser/pat-lt-bracket-1.stderr b/tests/ui/parser/pat-lt-bracket-1.stderr index e8ccbad66..f39487052 100644 --- a/tests/ui/parser/pat-lt-bracket-1.stderr +++ b/tests/ui/parser/pat-lt-bracket-1.stderr @@ -1,8 +1,8 @@ -error: expected one of `=>`, `@`, `if`, or `|`, found `<` +error: expected one of `,`, `=>`, `@`, `if`, `|`, or `}`, found `<` --> $DIR/pat-lt-bracket-1.rs:3:7 | LL | x < 7 => (), - | ^ expected one of `=>`, `@`, `if`, or `|` + | ^ expected one of `,`, `=>`, `@`, `if`, `|`, or `}` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/pat-lt-bracket-2.stderr b/tests/ui/parser/pat-lt-bracket-2.stderr index c78f96e1a..5fe97b2ef 100644 --- a/tests/ui/parser/pat-lt-bracket-2.stderr +++ b/tests/ui/parser/pat-lt-bracket-2.stderr @@ -14,5 +14,5 @@ help: if this is a type, explicitly ignore the parameter name LL | fn a(_: B<) {} | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/pat-lt-bracket-3.stderr b/tests/ui/parser/pat-lt-bracket-3.stderr index afdf1e9a5..cdb1b3177 100644 --- a/tests/ui/parser/pat-lt-bracket-3.stderr +++ b/tests/ui/parser/pat-lt-bracket-3.stderr @@ -9,5 +9,5 @@ help: use `::<...>` instead of `<...>` to specify lifetime, type, or const argum LL | Foo::<T>(x, y) => { | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/pat-lt-bracket-4.stderr b/tests/ui/parser/pat-lt-bracket-4.stderr index b71a5ad93..92d16564a 100644 --- a/tests/ui/parser/pat-lt-bracket-4.stderr +++ b/tests/ui/parser/pat-lt-bracket-4.stderr @@ -9,5 +9,5 @@ help: use `::<...>` instead of `<...>` to specify lifetime, type, or const argum LL | Foo::<T>::A(value) => value, | ++ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/pat-lt-bracket-5.stderr b/tests/ui/parser/pat-lt-bracket-5.stderr index e23674bce..e556e6c02 100644 --- a/tests/ui/parser/pat-lt-bracket-5.stderr +++ b/tests/ui/parser/pat-lt-bracket-5.stderr @@ -4,5 +4,5 @@ error: expected one of `:`, `;`, `=`, `@`, or `|`, found `[` LL | let v[0] = v[1]; | ^ expected one of `:`, `;`, `=`, `@`, or `|` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/pat-ranges-1.stderr b/tests/ui/parser/pat-ranges-1.stderr index b64a3ce5c..e4d4e145c 100644 --- a/tests/ui/parser/pat-ranges-1.stderr +++ b/tests/ui/parser/pat-ranges-1.stderr @@ -4,5 +4,5 @@ error: expected one of `:`, `;`, `=`, or `|`, found `..=` LL | let macropus!() ..= 11 = 12; | ^^^ expected one of `:`, `;`, `=`, or `|` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/pat-ranges-2.stderr b/tests/ui/parser/pat-ranges-2.stderr index 1a9e33beb..c27436a81 100644 --- a/tests/ui/parser/pat-ranges-2.stderr +++ b/tests/ui/parser/pat-ranges-2.stderr @@ -4,5 +4,5 @@ error: expected one of `::`, `:`, `;`, `=`, or `|`, found `!` LL | let 10 ..= makropulos!() = 12; | ^ expected one of `::`, `:`, `;`, `=`, or `|` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/pat-ranges-3.stderr b/tests/ui/parser/pat-ranges-3.stderr index c9787b789..611b35a65 100644 --- a/tests/ui/parser/pat-ranges-3.stderr +++ b/tests/ui/parser/pat-ranges-3.stderr @@ -4,5 +4,5 @@ error: expected one of `:`, `;`, `=`, or `|`, found `+` LL | let 10 ..= 10 + 3 = 12; | ^ expected one of `:`, `;`, `=`, or `|` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/pat-ranges-4.stderr b/tests/ui/parser/pat-ranges-4.stderr index 69084b5a4..c30160291 100644 --- a/tests/ui/parser/pat-ranges-4.stderr +++ b/tests/ui/parser/pat-ranges-4.stderr @@ -4,5 +4,5 @@ error: expected one of `...`, `..=`, `..`, `:`, `;`, `=`, or `|`, found `-` LL | let 10 - 3 ..= 10 = 8; | ^ expected one of 7 possible tokens -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/pat-ref-enum.stderr b/tests/ui/parser/pat-ref-enum.stderr index a3bce3372..ecda487d0 100644 --- a/tests/ui/parser/pat-ref-enum.stderr +++ b/tests/ui/parser/pat-ref-enum.stderr @@ -4,5 +4,5 @@ error: expected identifier, found enum pattern LL | ref Some(i) => {} | ^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/pat-tuple-1.stderr b/tests/ui/parser/pat-tuple-1.stderr index 391f2c428..579365730 100644 --- a/tests/ui/parser/pat-tuple-1.stderr +++ b/tests/ui/parser/pat-tuple-1.stderr @@ -4,5 +4,5 @@ error: expected pattern, found `,` LL | (, ..) => {} | ^ expected pattern -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/pat-tuple-3.stderr b/tests/ui/parser/pat-tuple-3.stderr index 9ac0611c5..7ce00462b 100644 --- a/tests/ui/parser/pat-tuple-3.stderr +++ b/tests/ui/parser/pat-tuple-3.stderr @@ -6,5 +6,5 @@ LL | (.., pat, ..) => {} | | | previously used here -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/pub-method-macro.stderr b/tests/ui/parser/pub-method-macro.stderr index 7c7a90926..35cbf4230 100644 --- a/tests/ui/parser/pub-method-macro.stderr +++ b/tests/ui/parser/pub-method-macro.stderr @@ -6,5 +6,5 @@ LL | pub defn!(f); | = help: try adjusting the macro to put `pub` inside the invocation -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/public-instead-of-pub-1.stderr b/tests/ui/parser/public-instead-of-pub-1.stderr index 795a5bcf5..3fbe8d0b1 100644 --- a/tests/ui/parser/public-instead-of-pub-1.stderr +++ b/tests/ui/parser/public-instead-of-pub-1.stderr @@ -9,5 +9,5 @@ help: write `pub` instead of `public` to make the item public LL | pub enum Test { | ~~~ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/public-instead-of-pub-2.stderr b/tests/ui/parser/public-instead-of-pub-2.stderr index efe225656..09d564d7a 100644 --- a/tests/ui/parser/public-instead-of-pub-2.stderr +++ b/tests/ui/parser/public-instead-of-pub-2.stderr @@ -4,5 +4,5 @@ error: expected one of `!` or `::`, found keyword `let` LL | public let x = 1; | ^^^ expected one of `!` or `::` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/public-instead-of-pub-3.stderr b/tests/ui/parser/public-instead-of-pub-3.stderr index 72efae08d..b9b924e67 100644 --- a/tests/ui/parser/public-instead-of-pub-3.stderr +++ b/tests/ui/parser/public-instead-of-pub-3.stderr @@ -9,5 +9,5 @@ help: write `pub` instead of `public` to make the item public LL | pub const X: i32 = 123; | ~~~ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/public-instead-of-pub.stderr b/tests/ui/parser/public-instead-of-pub.stderr index af875491e..c98f8a991 100644 --- a/tests/ui/parser/public-instead-of-pub.stderr +++ b/tests/ui/parser/public-instead-of-pub.stderr @@ -9,5 +9,5 @@ help: write `pub` instead of `public` to make the item public LL | pub struct X; | ~~~ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/qualified-path-in-turbofish.stderr b/tests/ui/parser/qualified-path-in-turbofish.stderr index 8857d2ef3..6e5af8cc1 100644 --- a/tests/ui/parser/qualified-path-in-turbofish.stderr +++ b/tests/ui/parser/qualified-path-in-turbofish.stderr @@ -4,5 +4,5 @@ error: found single colon before projection in qualified path LL | template::<<Impl as T>:Ty>(); | ^ help: use double colon: `::` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/range-3.stderr b/tests/ui/parser/range-3.stderr index 340167f18..c8f26a3ba 100644 --- a/tests/ui/parser/range-3.stderr +++ b/tests/ui/parser/range-3.stderr @@ -4,5 +4,5 @@ error: expected one of `.`, `;`, `?`, `else`, or an operator, found `..` LL | let r = 1..2..3; | ^^ expected one of `.`, `;`, `?`, `else`, or an operator -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/range-4.stderr b/tests/ui/parser/range-4.stderr index 720d48938..a797fa319 100644 --- a/tests/ui/parser/range-4.stderr +++ b/tests/ui/parser/range-4.stderr @@ -4,5 +4,5 @@ error: expected one of `.`, `;`, `?`, `else`, or an operator, found `..` LL | let r = ..1..2; | ^^ expected one of `.`, `;`, `?`, `else`, or an operator -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/range-inclusive-extra-equals.stderr b/tests/ui/parser/range-inclusive-extra-equals.stderr index d37b6be4f..83df719dd 100644 --- a/tests/ui/parser/range-inclusive-extra-equals.stderr +++ b/tests/ui/parser/range-inclusive-extra-equals.stderr @@ -6,5 +6,5 @@ LL | if let 1..==3 = 1 {} | = note: inclusive ranges end with a single equals sign (`..=`) -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/range_inclusive.stderr b/tests/ui/parser/range_inclusive.stderr index 8a9178263..0fd7f28db 100644 --- a/tests/ui/parser/range_inclusive.stderr +++ b/tests/ui/parser/range_inclusive.stderr @@ -6,6 +6,6 @@ LL | for _ in 1..= {} | = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0586`. diff --git a/tests/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.stderr b/tests/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.stderr index 3a7e2a4b1..796b1324a 100644 --- a/tests/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.stderr +++ b/tests/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.stderr @@ -4,6 +4,6 @@ error[E0748]: unterminated raw string LL | r" | ^ unterminated raw string -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0748`. diff --git a/tests/ui/parser/raw/raw-byte-string-eof.stderr b/tests/ui/parser/raw/raw-byte-string-eof.stderr index a76668e80..88fd53904 100644 --- a/tests/ui/parser/raw/raw-byte-string-eof.stderr +++ b/tests/ui/parser/raw/raw-byte-string-eof.stderr @@ -8,6 +8,6 @@ LL | br##"a"#; | = note: this raw string should be terminated with `"##` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0748`. diff --git a/tests/ui/parser/raw/raw-literal-self.stderr b/tests/ui/parser/raw/raw-literal-self.stderr index 2a40dfe20..f42c3e8e7 100644 --- a/tests/ui/parser/raw/raw-literal-self.stderr +++ b/tests/ui/parser/raw/raw-literal-self.stderr @@ -4,5 +4,5 @@ error: `self` cannot be a raw identifier LL | let r#self: (); | ^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/raw/raw-literal-underscore.stderr b/tests/ui/parser/raw/raw-literal-underscore.stderr index d7a364d85..2edba430d 100644 --- a/tests/ui/parser/raw/raw-literal-underscore.stderr +++ b/tests/ui/parser/raw/raw-literal-underscore.stderr @@ -4,5 +4,5 @@ error: `_` cannot be a raw identifier LL | let r#_: (); | ^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/raw/raw-str-delim.stderr b/tests/ui/parser/raw/raw-str-delim.stderr index 8a04f99a1..5edd18cb4 100644 --- a/tests/ui/parser/raw/raw-str-delim.stderr +++ b/tests/ui/parser/raw/raw-str-delim.stderr @@ -4,5 +4,5 @@ error: found invalid character; only `#` is allowed in raw string delimitation: LL | r#~"#"~# | ^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/raw/raw-str-unterminated.stderr b/tests/ui/parser/raw/raw-str-unterminated.stderr index 077f763f1..9d15a2817 100644 --- a/tests/ui/parser/raw/raw-str-unterminated.stderr +++ b/tests/ui/parser/raw/raw-str-unterminated.stderr @@ -6,6 +6,6 @@ LL | r#" string literal goes on | = note: this raw string should be terminated with `"#` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0748`. diff --git a/tests/ui/parser/raw/raw-string-2.stderr b/tests/ui/parser/raw/raw-string-2.stderr index 8bbac9d7b..90dd9775e 100644 --- a/tests/ui/parser/raw/raw-string-2.stderr +++ b/tests/ui/parser/raw/raw-string-2.stderr @@ -6,6 +6,6 @@ LL | let x = r###"here's a long string"# "# "##; | = note: this raw string should be terminated with `"###` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0748`. diff --git a/tests/ui/parser/raw/raw-string.stderr b/tests/ui/parser/raw/raw-string.stderr index b2b853a89..6654ef7a7 100644 --- a/tests/ui/parser/raw/raw-string.stderr +++ b/tests/ui/parser/raw/raw-string.stderr @@ -8,6 +8,6 @@ LL | let x = r##"lol"#; | = note: this raw string should be terminated with `"##` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0748`. diff --git a/tests/ui/parser/raw/too-many-hash.stderr b/tests/ui/parser/raw/too-many-hash.stderr index 29ec17842..1c46b5385 100644 --- a/tests/ui/parser/raw/too-many-hash.stderr +++ b/tests/ui/parser/raw/too-many-hash.stderr @@ -4,5 +4,5 @@ error: too many `#` symbols: raw strings may be delimited by up to 255 `#` symbo LL | ... = r################################################################################################################################################################################################################################################################"very raw"##############################################################################################################################################################################################################################################################... | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/recover-enum2.stderr b/tests/ui/parser/recover-enum2.stderr deleted file mode 100644 index 7634bca92..000000000 --- a/tests/ui/parser/recover-enum2.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error: expected type, found `{` - --> $DIR/recover-enum2.rs:6:18 - | -LL | Var3 { - | ---- while parsing this struct -LL | abc: {}, - | ^ expected type - -error: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `{` - --> $DIR/recover-enum2.rs:25:22 - | -LL | Nope(i32 {}) - | ^ expected one of 7 possible tokens - -error: aborting due to 2 previous errors - diff --git a/tests/ui/parser/recover-for-loop-parens-around-head.stderr b/tests/ui/parser/recover-for-loop-parens-around-head.stderr deleted file mode 100644 index 3bad29f20..000000000 --- a/tests/ui/parser/recover-for-loop-parens-around-head.stderr +++ /dev/null @@ -1,27 +0,0 @@ -error: expected one of `)`, `,`, `@`, or `|`, found keyword `in` - --> $DIR/recover-for-loop-parens-around-head.rs:10:16 - | -LL | for ( elem in vec ) { - | ^^ expected one of `)`, `,`, `@`, or `|` - -error: unexpected parentheses surrounding `for` loop head - --> $DIR/recover-for-loop-parens-around-head.rs:10:9 - | -LL | for ( elem in vec ) { - | ^ ^ - | -help: remove parentheses in `for` loop - | -LL - for ( elem in vec ) { -LL + for elem in vec { - | - -error[E0308]: mismatched types - --> $DIR/recover-for-loop-parens-around-head.rs:13:38 - | -LL | const RECOVERY_WITNESS: () = 0; - | ^ expected `()`, found integer - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.rs b/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.rs new file mode 100644 index 000000000..b9e3c5783 --- /dev/null +++ b/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.rs @@ -0,0 +1,13 @@ +trait Trait {} + +fn test(_: &for<'a> dyn Trait) {} +//~^ ERROR `for<...>` expected after `dyn`, not before + +fn test2(_: for<'a> impl Trait) {} +//~^ ERROR `for<...>` expected after `impl`, not before + +// Issue #118564 +type A2 = dyn<for<> dyn>; +//~^ ERROR expected identifier, found `>` + +fn main() {} diff --git a/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.stderr b/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.stderr new file mode 100644 index 000000000..a012220e8 --- /dev/null +++ b/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.stderr @@ -0,0 +1,32 @@ +error: `for<...>` expected after `dyn`, not before + --> $DIR/recover-hrtb-before-dyn-impl-kw.rs:3:21 + | +LL | fn test(_: &for<'a> dyn Trait) {} + | ^^^ + | +help: move `dyn` before the `for<...>` + | +LL - fn test(_: &for<'a> dyn Trait) {} +LL + fn test(_: &dyn for<'a> Trait) {} + | + +error: `for<...>` expected after `impl`, not before + --> $DIR/recover-hrtb-before-dyn-impl-kw.rs:6:21 + | +LL | fn test2(_: for<'a> impl Trait) {} + | ^^^^ + | +help: move `impl` before the `for<...>` + | +LL - fn test2(_: for<'a> impl Trait) {} +LL + fn test2(_: impl for<'a> Trait) {} + | + +error: expected identifier, found `>` + --> $DIR/recover-hrtb-before-dyn-impl-kw.rs:10:24 + | +LL | type A2 = dyn<for<> dyn>; + | ^ expected identifier + +error: aborting due to 3 previous errors + diff --git a/tests/ui/parser/issues/issue-104088.rs b/tests/ui/parser/recover/binding-name-starting-with-number.rs index 3dc636b6a..6b279c553 100644 --- a/tests/ui/parser/issues/issue-104088.rs +++ b/tests/ui/parser/recover/binding-name-starting-with-number.rs @@ -8,10 +8,12 @@ fn 1234test() { let 23name = 123; //~^ ERROR expected identifier, found `23name` - +} +fn foo() { let 2x: i32 = 123; //~^ ERROR expected identifier, found `2x` - +} +fn bar() { let 1x = 123; //~^ ERROR expected identifier, found `1x` } diff --git a/tests/ui/parser/issues/issue-104088.stderr b/tests/ui/parser/recover/binding-name-starting-with-number.stderr index 8b751759d..de59a7de0 100644 --- a/tests/ui/parser/issues/issue-104088.stderr +++ b/tests/ui/parser/recover/binding-name-starting-with-number.stderr @@ -1,53 +1,53 @@ error: expected identifier, found `1234test` - --> $DIR/issue-104088.rs:1:4 + --> $DIR/binding-name-starting-with-number.rs:1:4 | LL | fn 1234test() { | ^^^^^^^^ expected identifier | help: identifiers cannot start with a number - --> $DIR/issue-104088.rs:1:4 + --> $DIR/binding-name-starting-with-number.rs:1:4 | LL | fn 1234test() { | ^^^^ error: expected identifier, found `23name` - --> $DIR/issue-104088.rs:9:9 + --> $DIR/binding-name-starting-with-number.rs:9:9 | LL | let 23name = 123; | ^^^^^^ expected identifier | help: identifiers cannot start with a number - --> $DIR/issue-104088.rs:9:9 + --> $DIR/binding-name-starting-with-number.rs:9:9 | LL | let 23name = 123; | ^^ error: expected identifier, found `2x` - --> $DIR/issue-104088.rs:12:9 + --> $DIR/binding-name-starting-with-number.rs:13:9 | LL | let 2x: i32 = 123; | ^^ expected identifier | help: identifiers cannot start with a number - --> $DIR/issue-104088.rs:12:9 + --> $DIR/binding-name-starting-with-number.rs:13:9 | LL | let 2x: i32 = 123; | ^ error: expected identifier, found `1x` - --> $DIR/issue-104088.rs:15:9 + --> $DIR/binding-name-starting-with-number.rs:17:9 | LL | let 1x = 123; | ^^ expected identifier | help: identifiers cannot start with a number - --> $DIR/issue-104088.rs:15:9 + --> $DIR/binding-name-starting-with-number.rs:17:9 | LL | let 1x = 123; | ^ error[E0308]: mismatched types - --> $DIR/issue-104088.rs:5:12 + --> $DIR/binding-name-starting-with-number.rs:5:12 | LL | if let 2e1 = 123 { | ^^^ --- this expression has type `{integer}` diff --git a/tests/ui/parser/recover-assoc-const-constraint.rs b/tests/ui/parser/recover/recover-assoc-const-constraint.rs index 1453e6cb5..1453e6cb5 100644 --- a/tests/ui/parser/recover-assoc-const-constraint.rs +++ b/tests/ui/parser/recover/recover-assoc-const-constraint.rs diff --git a/tests/ui/parser/recover-assoc-const-constraint.stderr b/tests/ui/parser/recover/recover-assoc-const-constraint.stderr index 2d36ce4e9..2d36ce4e9 100644 --- a/tests/ui/parser/recover-assoc-const-constraint.stderr +++ b/tests/ui/parser/recover/recover-assoc-const-constraint.stderr diff --git a/tests/ui/parser/recover-assoc-eq-missing-term.rs b/tests/ui/parser/recover/recover-assoc-eq-missing-term.rs index 4b42c44dc..4b42c44dc 100644 --- a/tests/ui/parser/recover-assoc-eq-missing-term.rs +++ b/tests/ui/parser/recover/recover-assoc-eq-missing-term.rs diff --git a/tests/ui/parser/recover-assoc-eq-missing-term.stderr b/tests/ui/parser/recover/recover-assoc-eq-missing-term.stderr index 152f7f2fb..cf50c0266 100644 --- a/tests/ui/parser/recover-assoc-eq-missing-term.stderr +++ b/tests/ui/parser/recover/recover-assoc-eq-missing-term.stderr @@ -14,5 +14,5 @@ LL - bar::<Item = >(); LL + bar::<Item >(); | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/recover-assoc-lifetime-constraint.rs b/tests/ui/parser/recover/recover-assoc-lifetime-constraint.rs index 558fcdfe1..558fcdfe1 100644 --- a/tests/ui/parser/recover-assoc-lifetime-constraint.rs +++ b/tests/ui/parser/recover/recover-assoc-lifetime-constraint.rs diff --git a/tests/ui/parser/recover-assoc-lifetime-constraint.stderr b/tests/ui/parser/recover/recover-assoc-lifetime-constraint.stderr index 79437533d..39a6682fc 100644 --- a/tests/ui/parser/recover-assoc-lifetime-constraint.stderr +++ b/tests/ui/parser/recover/recover-assoc-lifetime-constraint.stderr @@ -8,5 +8,5 @@ LL | bar::<Item = 'a>(); | = help: if you meant to specify a trait object, write `dyn Trait + 'lifetime` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/recover-const-async-fn-ptr.rs b/tests/ui/parser/recover/recover-const-async-fn-ptr.rs index 25af8772c..25af8772c 100644 --- a/tests/ui/parser/recover-const-async-fn-ptr.rs +++ b/tests/ui/parser/recover/recover-const-async-fn-ptr.rs diff --git a/tests/ui/parser/recover-const-async-fn-ptr.stderr b/tests/ui/parser/recover/recover-const-async-fn-ptr.stderr index 7012096b6..7012096b6 100644 --- a/tests/ui/parser/recover-const-async-fn-ptr.stderr +++ b/tests/ui/parser/recover/recover-const-async-fn-ptr.stderr diff --git a/tests/ui/parser/recover-enum.rs b/tests/ui/parser/recover/recover-enum.rs index 08dd939e2..08dd939e2 100644 --- a/tests/ui/parser/recover-enum.rs +++ b/tests/ui/parser/recover/recover-enum.rs diff --git a/tests/ui/parser/recover-enum.stderr b/tests/ui/parser/recover/recover-enum.stderr index a2b650e4f..a2b650e4f 100644 --- a/tests/ui/parser/recover-enum.stderr +++ b/tests/ui/parser/recover/recover-enum.stderr diff --git a/tests/ui/parser/recover-enum2.rs b/tests/ui/parser/recover/recover-enum2.rs index 0c9420889..56b57f625 100644 --- a/tests/ui/parser/recover-enum2.rs +++ b/tests/ui/parser/recover/recover-enum2.rs @@ -8,7 +8,7 @@ fn main() { } // recover... - let a = 1; + let () = 1; //~ ERROR mismatched types enum Test2 { Fine, } @@ -24,5 +24,6 @@ fn main() { enum Test4 { Nope(i32 {}) //~ ERROR: found `{` } + let () = 1; //~ ERROR mismatched types } } diff --git a/tests/ui/parser/recover/recover-enum2.stderr b/tests/ui/parser/recover/recover-enum2.stderr new file mode 100644 index 000000000..132f84cc7 --- /dev/null +++ b/tests/ui/parser/recover/recover-enum2.stderr @@ -0,0 +1,37 @@ +error: expected type, found `{` + --> $DIR/recover-enum2.rs:6:18 + | +LL | Var3 { + | ---- while parsing this struct +LL | abc: {}, + | ^ expected type + +error: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `{` + --> $DIR/recover-enum2.rs:25:22 + | +LL | enum Test4 { + | ----- while parsing this enum +LL | Nope(i32 {}) + | ^ expected one of 7 possible tokens + | + = help: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }` + +error[E0308]: mismatched types + --> $DIR/recover-enum2.rs:11:9 + | +LL | let () = 1; + | ^^ - this expression has type `{integer}` + | | + | expected integer, found `()` + +error[E0308]: mismatched types + --> $DIR/recover-enum2.rs:27:13 + | +LL | let () = 1; + | ^^ - this expression has type `{integer}` + | | + | expected integer, found `()` + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/parser/recover-field-extra-angle-brackets-in-struct-with-a-field.rs b/tests/ui/parser/recover/recover-field-extra-angle-brackets-in-struct-with-a-field.rs index e815c7611..e815c7611 100644 --- a/tests/ui/parser/recover-field-extra-angle-brackets-in-struct-with-a-field.rs +++ b/tests/ui/parser/recover/recover-field-extra-angle-brackets-in-struct-with-a-field.rs diff --git a/tests/ui/parser/recover-field-extra-angle-brackets-in-struct-with-a-field.stderr b/tests/ui/parser/recover/recover-field-extra-angle-brackets-in-struct-with-a-field.stderr index 17237c930..2b56498c5 100644 --- a/tests/ui/parser/recover-field-extra-angle-brackets-in-struct-with-a-field.stderr +++ b/tests/ui/parser/recover/recover-field-extra-angle-brackets-in-struct-with-a-field.stderr @@ -7,5 +7,5 @@ LL | | LL | | } | |_ help: remove extra angle bracket -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/recover-field-extra-angle-brackets.rs b/tests/ui/parser/recover/recover-field-extra-angle-brackets.rs index 5e0e00bcb..5e0e00bcb 100644 --- a/tests/ui/parser/recover-field-extra-angle-brackets.rs +++ b/tests/ui/parser/recover/recover-field-extra-angle-brackets.rs diff --git a/tests/ui/parser/recover-field-extra-angle-brackets.stderr b/tests/ui/parser/recover/recover-field-extra-angle-brackets.stderr index 318e55f6e..628626926 100644 --- a/tests/ui/parser/recover-field-extra-angle-brackets.stderr +++ b/tests/ui/parser/recover/recover-field-extra-angle-brackets.stderr @@ -4,5 +4,5 @@ error: unmatched angle bracket LL | first: Vec<u8>>, | ^ help: remove extra angle bracket -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/recover-field-semi.rs b/tests/ui/parser/recover/recover-field-semi.rs index b70357886..b70357886 100644 --- a/tests/ui/parser/recover-field-semi.rs +++ b/tests/ui/parser/recover/recover-field-semi.rs diff --git a/tests/ui/parser/recover-field-semi.stderr b/tests/ui/parser/recover/recover-field-semi.stderr index 3cf484748..3cf484748 100644 --- a/tests/ui/parser/recover-field-semi.stderr +++ b/tests/ui/parser/recover/recover-field-semi.stderr diff --git a/tests/ui/parser/recover-fn-ptr-with-generics.rs b/tests/ui/parser/recover/recover-fn-ptr-with-generics.rs index 31de418be..31de418be 100644 --- a/tests/ui/parser/recover-fn-ptr-with-generics.rs +++ b/tests/ui/parser/recover/recover-fn-ptr-with-generics.rs diff --git a/tests/ui/parser/recover-fn-ptr-with-generics.stderr b/tests/ui/parser/recover/recover-fn-ptr-with-generics.stderr index 069fcffe9..069fcffe9 100644 --- a/tests/ui/parser/recover-fn-ptr-with-generics.stderr +++ b/tests/ui/parser/recover/recover-fn-ptr-with-generics.stderr diff --git a/tests/ui/parser/recover-fn-trait-from-fn-kw.rs b/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.rs index b6611e627..b6611e627 100644 --- a/tests/ui/parser/recover-fn-trait-from-fn-kw.rs +++ b/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.rs diff --git a/tests/ui/parser/recover-fn-trait-from-fn-kw.stderr b/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.stderr index 3681a796c..3681a796c 100644 --- a/tests/ui/parser/recover-fn-trait-from-fn-kw.stderr +++ b/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.stderr diff --git a/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed b/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed new file mode 100644 index 000000000..6afc2d993 --- /dev/null +++ b/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed @@ -0,0 +1,15 @@ +// run-rustfix +// Here we test that the parser is able to recover in a situation like +// `for ( $pat in $expr )` since that is familiar syntax in other languages. +// Instead we suggest that the user writes `for $pat in $expr`. + +#![deny(unused)] // Make sure we don't trigger `unused_parens`. + +fn main() { + let vec = vec![1, 2, 3]; + + for _elem in vec { + //~^ ERROR unexpected parentheses surrounding `for` loop head + const _RECOVERY_WITNESS: u32 = 0u32; //~ ERROR mismatched types + } +} diff --git a/tests/ui/parser/recover-for-loop-parens-around-head.rs b/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs index 053b428bd..b1716900c 100644 --- a/tests/ui/parser/recover-for-loop-parens-around-head.rs +++ b/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs @@ -1,3 +1,4 @@ +// run-rustfix // Here we test that the parser is able to recover in a situation like // `for ( $pat in $expr )` since that is familiar syntax in other languages. // Instead we suggest that the user writes `for $pat in $expr`. @@ -7,9 +8,8 @@ fn main() { let vec = vec![1, 2, 3]; - for ( elem in vec ) { - //~^ ERROR expected one of `)`, `,`, `@`, or `|`, found keyword `in` - //~| ERROR unexpected parentheses surrounding `for` loop head - const RECOVERY_WITNESS: () = 0; //~ ERROR mismatched types + for ( _elem in vec ) { + //~^ ERROR unexpected parentheses surrounding `for` loop head + const _RECOVERY_WITNESS: u32 = 0u8; //~ ERROR mismatched types } } diff --git a/tests/ui/parser/recover/recover-for-loop-parens-around-head.stderr b/tests/ui/parser/recover/recover-for-loop-parens-around-head.stderr new file mode 100644 index 000000000..beaa346e7 --- /dev/null +++ b/tests/ui/parser/recover/recover-for-loop-parens-around-head.stderr @@ -0,0 +1,26 @@ +error: unexpected parentheses surrounding `for` loop head + --> $DIR/recover-for-loop-parens-around-head.rs:11:9 + | +LL | for ( _elem in vec ) { + | ^ ^ + | +help: remove parentheses in `for` loop + | +LL - for ( _elem in vec ) { +LL + for _elem in vec { + | + +error[E0308]: mismatched types + --> $DIR/recover-for-loop-parens-around-head.rs:13:40 + | +LL | const _RECOVERY_WITNESS: u32 = 0u8; + | ^^^ expected `u32`, found `u8` + | +help: change the type of the numeric literal from `u8` to `u32` + | +LL | const _RECOVERY_WITNESS: u32 = 0u32; + | ~~~ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/parser/recover-from-bad-variant.rs b/tests/ui/parser/recover/recover-from-bad-variant.rs index e8887147c..e8887147c 100644 --- a/tests/ui/parser/recover-from-bad-variant.rs +++ b/tests/ui/parser/recover/recover-from-bad-variant.rs diff --git a/tests/ui/parser/recover-from-bad-variant.stderr b/tests/ui/parser/recover/recover-from-bad-variant.stderr index 04968bbdf..04968bbdf 100644 --- a/tests/ui/parser/recover-from-bad-variant.stderr +++ b/tests/ui/parser/recover/recover-from-bad-variant.stderr diff --git a/tests/ui/parser/recover-from-homoglyph.rs b/tests/ui/parser/recover/recover-from-homoglyph.rs index 99ce0d1a6..99ce0d1a6 100644 --- a/tests/ui/parser/recover-from-homoglyph.rs +++ b/tests/ui/parser/recover/recover-from-homoglyph.rs diff --git a/tests/ui/parser/recover-from-homoglyph.stderr b/tests/ui/parser/recover/recover-from-homoglyph.stderr index f11ca9fd5..f11ca9fd5 100644 --- a/tests/ui/parser/recover-from-homoglyph.stderr +++ b/tests/ui/parser/recover/recover-from-homoglyph.stderr diff --git a/tests/ui/parser/recover-labeled-non-block-expr.fixed b/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed index c2e76444d..c2e76444d 100644 --- a/tests/ui/parser/recover-labeled-non-block-expr.fixed +++ b/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed diff --git a/tests/ui/parser/recover-labeled-non-block-expr.rs b/tests/ui/parser/recover/recover-labeled-non-block-expr.rs index fc11c646a..fc11c646a 100644 --- a/tests/ui/parser/recover-labeled-non-block-expr.rs +++ b/tests/ui/parser/recover/recover-labeled-non-block-expr.rs diff --git a/tests/ui/parser/recover-labeled-non-block-expr.stderr b/tests/ui/parser/recover/recover-labeled-non-block-expr.stderr index d66ce6950..d66ce6950 100644 --- a/tests/ui/parser/recover-labeled-non-block-expr.stderr +++ b/tests/ui/parser/recover/recover-labeled-non-block-expr.stderr diff --git a/tests/ui/parser/recover-missing-semi-before-item.fixed b/tests/ui/parser/recover/recover-missing-semi-before-item.fixed index acb846373..acb846373 100644 --- a/tests/ui/parser/recover-missing-semi-before-item.fixed +++ b/tests/ui/parser/recover/recover-missing-semi-before-item.fixed diff --git a/tests/ui/parser/recover-missing-semi-before-item.rs b/tests/ui/parser/recover/recover-missing-semi-before-item.rs index ef6cfe3c4..ef6cfe3c4 100644 --- a/tests/ui/parser/recover-missing-semi-before-item.rs +++ b/tests/ui/parser/recover/recover-missing-semi-before-item.rs diff --git a/tests/ui/parser/recover-missing-semi-before-item.stderr b/tests/ui/parser/recover/recover-missing-semi-before-item.stderr index 61c43f2f1..61c43f2f1 100644 --- a/tests/ui/parser/recover-missing-semi-before-item.stderr +++ b/tests/ui/parser/recover/recover-missing-semi-before-item.stderr diff --git a/tests/ui/parser/recover-missing-semi.rs b/tests/ui/parser/recover/recover-missing-semi.rs index f47d5e680..f47d5e680 100644 --- a/tests/ui/parser/recover-missing-semi.rs +++ b/tests/ui/parser/recover/recover-missing-semi.rs diff --git a/tests/ui/parser/recover-missing-semi.stderr b/tests/ui/parser/recover/recover-missing-semi.stderr index ba4798285..ba4798285 100644 --- a/tests/ui/parser/recover-missing-semi.stderr +++ b/tests/ui/parser/recover/recover-missing-semi.stderr diff --git a/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed b/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed new file mode 100644 index 000000000..6b9b7fa88 --- /dev/null +++ b/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed @@ -0,0 +1,12 @@ +// run-rustfix +fn main() { + let val = 42; + let x = match val { + 0 if true => { + //~^ ERROR unexpected parentheses surrounding `match` arm pattern + 42u8 + } + _ => 0u8, + }; + let _y: u32 = x.into(); //~ ERROR mismatched types +} diff --git a/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs b/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs new file mode 100644 index 000000000..f523581e2 --- /dev/null +++ b/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs @@ -0,0 +1,12 @@ +// run-rustfix +fn main() { + let val = 42; + let x = match val { + (0 if true) => { + //~^ ERROR unexpected parentheses surrounding `match` arm pattern + 42u8 + } + _ => 0u8, + }; + let _y: u32 = x; //~ ERROR mismatched types +} diff --git a/tests/ui/parser/recover/recover-parens-around-match-arm-head.stderr b/tests/ui/parser/recover/recover-parens-around-match-arm-head.stderr new file mode 100644 index 000000000..bad4d7d2f --- /dev/null +++ b/tests/ui/parser/recover/recover-parens-around-match-arm-head.stderr @@ -0,0 +1,28 @@ +error: unexpected parentheses surrounding `match` arm pattern + --> $DIR/recover-parens-around-match-arm-head.rs:5:9 + | +LL | (0 if true) => { + | ^ ^ + | +help: remove parentheses surrounding the pattern + | +LL - (0 if true) => { +LL + 0 if true => { + | + +error[E0308]: mismatched types + --> $DIR/recover-parens-around-match-arm-head.rs:11:19 + | +LL | let _y: u32 = x; + | --- ^ expected `u32`, found `u8` + | | + | expected due to this + | +help: you can convert a `u8` to a `u32` + | +LL | let _y: u32 = x.into(); + | +++++++ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/parser/recover-quantified-closure.rs b/tests/ui/parser/recover/recover-quantified-closure.rs index 10af39b70..10af39b70 100644 --- a/tests/ui/parser/recover-quantified-closure.rs +++ b/tests/ui/parser/recover/recover-quantified-closure.rs diff --git a/tests/ui/parser/recover-quantified-closure.stderr b/tests/ui/parser/recover/recover-quantified-closure.stderr index 37e93cbee..37e93cbee 100644 --- a/tests/ui/parser/recover-quantified-closure.stderr +++ b/tests/ui/parser/recover/recover-quantified-closure.stderr diff --git a/tests/ui/parser/recover-range-pats.rs b/tests/ui/parser/recover/recover-range-pats.rs index 156c7ad94..156c7ad94 100644 --- a/tests/ui/parser/recover-range-pats.rs +++ b/tests/ui/parser/recover/recover-range-pats.rs diff --git a/tests/ui/parser/recover-range-pats.stderr b/tests/ui/parser/recover/recover-range-pats.stderr index 5b69ca5cd..5b69ca5cd 100644 --- a/tests/ui/parser/recover-range-pats.stderr +++ b/tests/ui/parser/recover/recover-range-pats.stderr diff --git a/tests/ui/parser/recover-ref-dyn-mut.rs b/tests/ui/parser/recover/recover-ref-dyn-mut.rs index 3016275cc..3016275cc 100644 --- a/tests/ui/parser/recover-ref-dyn-mut.rs +++ b/tests/ui/parser/recover/recover-ref-dyn-mut.rs diff --git a/tests/ui/parser/recover-ref-dyn-mut.stderr b/tests/ui/parser/recover/recover-ref-dyn-mut.stderr index c048c8ea1..c048c8ea1 100644 --- a/tests/ui/parser/recover-ref-dyn-mut.stderr +++ b/tests/ui/parser/recover/recover-ref-dyn-mut.stderr diff --git a/tests/ui/parser/recover-struct.rs b/tests/ui/parser/recover/recover-struct.rs index bfa5b454c..bfa5b454c 100644 --- a/tests/ui/parser/recover-struct.rs +++ b/tests/ui/parser/recover/recover-struct.rs diff --git a/tests/ui/parser/recover-struct.stderr b/tests/ui/parser/recover/recover-struct.stderr index 9f6fb06ca..51a9e7077 100644 --- a/tests/ui/parser/recover-struct.stderr +++ b/tests/ui/parser/recover/recover-struct.stderr @@ -8,5 +8,5 @@ LL | Very LL | Bad | ^^^ unexpected token -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/recover-tuple-pat.rs b/tests/ui/parser/recover/recover-tuple-pat.rs index 7fded752d..7fded752d 100644 --- a/tests/ui/parser/recover-tuple-pat.rs +++ b/tests/ui/parser/recover/recover-tuple-pat.rs diff --git a/tests/ui/parser/recover-tuple-pat.stderr b/tests/ui/parser/recover/recover-tuple-pat.stderr index 93a6a66a6..e181f0720 100644 --- a/tests/ui/parser/recover-tuple-pat.stderr +++ b/tests/ui/parser/recover/recover-tuple-pat.stderr @@ -4,5 +4,5 @@ error: expected pattern, found `.` LL | (1, .=., 4) => { let _: usize = ""; } | ^ expected pattern -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/recover-tuple.rs b/tests/ui/parser/recover/recover-tuple.rs index 59e2695de..59e2695de 100644 --- a/tests/ui/parser/recover-tuple.rs +++ b/tests/ui/parser/recover/recover-tuple.rs diff --git a/tests/ui/parser/recover-tuple.stderr b/tests/ui/parser/recover/recover-tuple.stderr index 88891b54b..88891b54b 100644 --- a/tests/ui/parser/recover-tuple.stderr +++ b/tests/ui/parser/recover/recover-tuple.stderr diff --git a/tests/ui/parser/recover-unticked-labels.fixed b/tests/ui/parser/recover/recover-unticked-labels.fixed index 159d995b8..159d995b8 100644 --- a/tests/ui/parser/recover-unticked-labels.fixed +++ b/tests/ui/parser/recover/recover-unticked-labels.fixed diff --git a/tests/ui/parser/recover-unticked-labels.rs b/tests/ui/parser/recover/recover-unticked-labels.rs index 56034de68..56034de68 100644 --- a/tests/ui/parser/recover-unticked-labels.rs +++ b/tests/ui/parser/recover/recover-unticked-labels.rs diff --git a/tests/ui/parser/recover-unticked-labels.stderr b/tests/ui/parser/recover/recover-unticked-labels.stderr index fbd108ca6..fbd108ca6 100644 --- a/tests/ui/parser/recover-unticked-labels.stderr +++ b/tests/ui/parser/recover/recover-unticked-labels.stderr diff --git a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-0.fixed b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed index 227c40e97..227c40e97 100644 --- a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-0.fixed +++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed diff --git a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-0.rs b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs index 3699e6fe5..3699e6fe5 100644 --- a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-0.rs +++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs diff --git a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-0.stderr b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr index 18aa5fadb..18aa5fadb 100644 --- a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-0.stderr +++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.stderr diff --git a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-1.rs b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-1.rs index f515ae81e..f515ae81e 100644 --- a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-1.rs +++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-1.rs diff --git a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-1.stderr b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-1.stderr index 2219c2a73..2219c2a73 100644 --- a/tests/ui/parser/recover-where-clause-before-tuple-struct-body-1.stderr +++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-1.stderr diff --git a/tests/ui/parser/recovered-struct-variant.stderr b/tests/ui/parser/recovered-struct-variant.stderr index 78c67866f..f0050394b 100644 --- a/tests/ui/parser/recovered-struct-variant.stderr +++ b/tests/ui/parser/recovered-struct-variant.stderr @@ -6,5 +6,5 @@ LL | A { a, b: usize } | | | while parsing this struct -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/regions-out-of-scope-slice.stderr b/tests/ui/parser/regions-out-of-scope-slice.stderr index bbc657ffd..5d8f6af16 100644 --- a/tests/ui/parser/regions-out-of-scope-slice.stderr +++ b/tests/ui/parser/regions-out-of-scope-slice.stderr @@ -7,5 +7,5 @@ LL | x = &'blk [1,2,3]; | annotated with lifetime here | help: remove the lifetime annotation -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/removed-syntax-closure-lifetime.stderr b/tests/ui/parser/removed-syntax-closure-lifetime.stderr index e107c6b78..4c991d67e 100644 --- a/tests/ui/parser/removed-syntax-closure-lifetime.stderr +++ b/tests/ui/parser/removed-syntax-closure-lifetime.stderr @@ -9,5 +9,5 @@ help: you might have meant to end the type parameters here LL | type closure = Box<lt>/fn()>; | + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/removed-syntax-enum-newtype.stderr b/tests/ui/parser/removed-syntax-enum-newtype.stderr index 8f7ca3567..5b917e938 100644 --- a/tests/ui/parser/removed-syntax-enum-newtype.stderr +++ b/tests/ui/parser/removed-syntax-enum-newtype.stderr @@ -6,5 +6,5 @@ LL | enum e = isize; | | | while parsing this enum -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/removed-syntax-field-let.stderr b/tests/ui/parser/removed-syntax-field-let.stderr index 9bc18dabd..339d056e6 100644 --- a/tests/ui/parser/removed-syntax-field-let.stderr +++ b/tests/ui/parser/removed-syntax-field-let.stderr @@ -10,5 +10,5 @@ LL | let foo: (), = note: the `let` keyword is not allowed in `struct` fields = note: see <https://doc.rust-lang.org/book/ch05-01-defining-structs.html> for more information -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/removed-syntax-field-semicolon.stderr b/tests/ui/parser/removed-syntax-field-semicolon.stderr index 532d4fb2b..522912a9e 100644 --- a/tests/ui/parser/removed-syntax-field-semicolon.stderr +++ b/tests/ui/parser/removed-syntax-field-semicolon.stderr @@ -6,5 +6,5 @@ LL | struct S { LL | bar: (); | ^ help: replace `;` with `,` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/removed-syntax-fixed-vec.stderr b/tests/ui/parser/removed-syntax-fixed-vec.stderr index a2b97544f..5bc9c2ccf 100644 --- a/tests/ui/parser/removed-syntax-fixed-vec.stderr +++ b/tests/ui/parser/removed-syntax-fixed-vec.stderr @@ -4,5 +4,5 @@ error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `*` LL | type v = [isize * 3]; | ^ expected one of 7 possible tokens -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/removed-syntax-mode.stderr b/tests/ui/parser/removed-syntax-mode.stderr index d0393b379..fd964c4b7 100644 --- a/tests/ui/parser/removed-syntax-mode.stderr +++ b/tests/ui/parser/removed-syntax-mode.stderr @@ -4,5 +4,5 @@ error: expected parameter name, found `+` LL | fn f(+x: isize) {} | ^ expected parameter name -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/removed-syntax-mut-vec-expr.stderr b/tests/ui/parser/removed-syntax-mut-vec-expr.stderr index 313420fb9..a1aa1ae49 100644 --- a/tests/ui/parser/removed-syntax-mut-vec-expr.stderr +++ b/tests/ui/parser/removed-syntax-mut-vec-expr.stderr @@ -4,5 +4,5 @@ error: expected expression, found keyword `mut` LL | let v = [mut 1, 2, 3, 4]; | ^^^ expected expression -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/removed-syntax-mut-vec-ty.stderr b/tests/ui/parser/removed-syntax-mut-vec-ty.stderr index 02b518e25..beaae7cdd 100644 --- a/tests/ui/parser/removed-syntax-mut-vec-ty.stderr +++ b/tests/ui/parser/removed-syntax-mut-vec-ty.stderr @@ -4,5 +4,5 @@ error: expected type, found keyword `mut` LL | type v = [mut isize]; | ^^^ expected type -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/removed-syntax-ptr-lifetime.stderr b/tests/ui/parser/removed-syntax-ptr-lifetime.stderr index 914de43e6..5c74efffa 100644 --- a/tests/ui/parser/removed-syntax-ptr-lifetime.stderr +++ b/tests/ui/parser/removed-syntax-ptr-lifetime.stderr @@ -4,5 +4,5 @@ error: expected one of `!`, `(`, `::`, `;`, `<`, or `where`, found `/` LL | type bptr = &lifetime/isize; | ^ expected one of `!`, `(`, `::`, `;`, `<`, or `where` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/removed-syntax-record.stderr b/tests/ui/parser/removed-syntax-record.stderr index 0a1655840..dbf09f1c7 100644 --- a/tests/ui/parser/removed-syntax-record.stderr +++ b/tests/ui/parser/removed-syntax-record.stderr @@ -4,5 +4,5 @@ error: expected type, found `{` LL | type t = { f: () }; | ^ expected type -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/removed-syntax-uniq-mut-expr.stderr b/tests/ui/parser/removed-syntax-uniq-mut-expr.stderr index 63d2fdb8c..7aaedad19 100644 --- a/tests/ui/parser/removed-syntax-uniq-mut-expr.stderr +++ b/tests/ui/parser/removed-syntax-uniq-mut-expr.stderr @@ -4,5 +4,5 @@ error: expected expression, found keyword `mut` LL | let a_box = box mut 42; | ^^^ expected expression -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/removed-syntax-uniq-mut-ty.stderr b/tests/ui/parser/removed-syntax-uniq-mut-ty.stderr index 39db0be9f..5ae1f4f58 100644 --- a/tests/ui/parser/removed-syntax-uniq-mut-ty.stderr +++ b/tests/ui/parser/removed-syntax-uniq-mut-ty.stderr @@ -4,5 +4,5 @@ error: expected one of `>`, a const expression, lifetime, or type, found keyword LL | type mut_box = Box<mut isize>; | ^^^ expected one of `>`, a const expression, lifetime, or type -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/removed-syntax-with-1.stderr b/tests/ui/parser/removed-syntax-with-1.stderr index c3f747b61..78042678a 100644 --- a/tests/ui/parser/removed-syntax-with-1.stderr +++ b/tests/ui/parser/removed-syntax-with-1.stderr @@ -7,5 +7,5 @@ LL | let b = S { foo: () with a, bar: () }; | | help: try adding a comma: `,` | while parsing this struct -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/self-in-function-arg.stderr b/tests/ui/parser/self-in-function-arg.stderr index 47d8381b0..9ceec8d46 100644 --- a/tests/ui/parser/self-in-function-arg.stderr +++ b/tests/ui/parser/self-in-function-arg.stderr @@ -4,5 +4,5 @@ error: unexpected `self` parameter in function LL | fn foo(x:i32, self: i32) -> i32 { self } | ^^^^ must be the first parameter of an associated function -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/shebang/issue-71471-ignore-tidy.stderr b/tests/ui/parser/shebang/issue-71471-ignore-tidy.stderr index 896a9dc83..41cd4fb93 100644 --- a/tests/ui/parser/shebang/issue-71471-ignore-tidy.stderr +++ b/tests/ui/parser/shebang/issue-71471-ignore-tidy.stderr @@ -4,5 +4,5 @@ error: expected `[`, found `B` LL | #!B | ^ expected `[` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/shebang/shebang-doc-comment.stderr b/tests/ui/parser/shebang/shebang-doc-comment.stderr index a36b2a2f7..92fefded5 100644 --- a/tests/ui/parser/shebang/shebang-doc-comment.stderr +++ b/tests/ui/parser/shebang/shebang-doc-comment.stderr @@ -6,5 +6,5 @@ LL | [allow(unused_variables)] | = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/shebang/shebang-must-start-file.stderr b/tests/ui/parser/shebang/shebang-must-start-file.stderr index 50543e8bd..56991c96b 100644 --- a/tests/ui/parser/shebang/shebang-must-start-file.stderr +++ b/tests/ui/parser/shebang/shebang-must-start-file.stderr @@ -4,5 +4,5 @@ error: expected `[`, found `/` LL | #!/bin/bash | ^ expected `[` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/similar-tokens.stderr b/tests/ui/parser/similar-tokens.stderr index 90acfc052..7070232c1 100644 --- a/tests/ui/parser/similar-tokens.stderr +++ b/tests/ui/parser/similar-tokens.stderr @@ -7,5 +7,5 @@ LL | use x::{A. B}; | expected one of `,`, `::`, `as`, or `}` | help: missing `,` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/struct-filed-with-attr.stderr b/tests/ui/parser/struct-filed-with-attr.stderr index c2cd7e82e..d850ed620 100644 --- a/tests/ui/parser/struct-filed-with-attr.stderr +++ b/tests/ui/parser/struct-filed-with-attr.stderr @@ -4,5 +4,5 @@ error: expected `,`, or `}`, found `#` LL | owo: bool | ^ help: try adding a comma: `,` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/struct-literal-in-match-discriminant.stderr b/tests/ui/parser/struct-literal-in-match-discriminant.stderr index 692b4d735..5177f5f12 100644 --- a/tests/ui/parser/struct-literal-in-match-discriminant.stderr +++ b/tests/ui/parser/struct-literal-in-match-discriminant.stderr @@ -14,5 +14,5 @@ LL | x: 3 LL ~ }) { | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/suggest-assoc-const.stderr b/tests/ui/parser/suggest-assoc-const.stderr index 2ddfa07c5..7ba1dbdff 100644 --- a/tests/ui/parser/suggest-assoc-const.stderr +++ b/tests/ui/parser/suggest-assoc-const.stderr @@ -4,5 +4,5 @@ error: non-item in item list LL | let _X: i32; | ^^^ help: consider using `const` instead of `let` for associated const: `const` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/suggest-const-for-global-var.stderr b/tests/ui/parser/suggest-const-for-global-var.stderr index 94e44ec7f..235e621d8 100644 --- a/tests/ui/parser/suggest-const-for-global-var.stderr +++ b/tests/ui/parser/suggest-const-for-global-var.stderr @@ -4,5 +4,5 @@ error: expected item, found keyword `let` LL | let X: i32 = 12; | ^^^ consider using `const` or `static` instead of `let` for global variables -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.stderr b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.stderr index 396e0c130..c716d5908 100644 --- a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.stderr +++ b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.stderr @@ -11,5 +11,5 @@ LL | fn bar() {}; LL | } | - item list ends here -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/suggest-semi-in-array.stderr b/tests/ui/parser/suggest-semi-in-array.stderr index d7cd6efae..25b067995 100644 --- a/tests/ui/parser/suggest-semi-in-array.stderr +++ b/tests/ui/parser/suggest-semi-in-array.stderr @@ -6,5 +6,5 @@ LL | let v = [1 LL | 2]; | ^ unexpected token -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/suggest-semicolon-before-array.stderr b/tests/ui/parser/suggest-semicolon-before-array.stderr index 8a33321fb..f5573f5e4 100644 --- a/tests/ui/parser/suggest-semicolon-before-array.stderr +++ b/tests/ui/parser/suggest-semicolon-before-array.stderr @@ -9,5 +9,5 @@ help: consider adding `;` here LL | foo(); | + -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/suggest_misplaced_generics/enum.stderr b/tests/ui/parser/suggest_misplaced_generics/enum.stderr index 5f5947627..7bef9d709 100644 --- a/tests/ui/parser/suggest_misplaced_generics/enum.stderr +++ b/tests/ui/parser/suggest_misplaced_generics/enum.stderr @@ -10,5 +10,5 @@ LL - enum<T> Foo { Variant(T) } LL + enum Foo<T> { Variant(T) } | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/suggest_misplaced_generics/existing_generics.stderr b/tests/ui/parser/suggest_misplaced_generics/existing_generics.stderr index 89716e6f1..e887c0881 100644 --- a/tests/ui/parser/suggest_misplaced_generics/existing_generics.stderr +++ b/tests/ui/parser/suggest_misplaced_generics/existing_generics.stderr @@ -6,5 +6,5 @@ LL | fn<'a, B: 'a + std::ops::Add<Output = u32>> f<T>(_x: B) { } | = help: place the generic parameter name after the fn name -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.stderr b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.stderr index 061d0910a..18e173a9d 100644 --- a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.stderr +++ b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.stderr @@ -10,5 +10,5 @@ LL - fn<'a, B: 'a + std::ops::Add<Output = u32>> f(_x: B) { } LL + fn f<'a, B: 'a + std::ops::Add<Output = u32>>(_x: B) { } | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-invalid-generics.stderr b/tests/ui/parser/suggest_misplaced_generics/fn-invalid-generics.stderr index 47e120169..cde690835 100644 --- a/tests/ui/parser/suggest_misplaced_generics/fn-invalid-generics.stderr +++ b/tests/ui/parser/suggest_misplaced_generics/fn-invalid-generics.stderr @@ -4,5 +4,5 @@ error: expected identifier, found `<` LL | fn<~>()> id(x: T) -> T { x } | ^ expected identifier -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-simple.stderr b/tests/ui/parser/suggest_misplaced_generics/fn-simple.stderr index e749f1a0d..e77df69ee 100644 --- a/tests/ui/parser/suggest_misplaced_generics/fn-simple.stderr +++ b/tests/ui/parser/suggest_misplaced_generics/fn-simple.stderr @@ -10,5 +10,5 @@ LL - fn<T> id(x: T) -> T { x } LL + fn id<T>(x: T) -> T { x } | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/suggest_misplaced_generics/struct.stderr b/tests/ui/parser/suggest_misplaced_generics/struct.stderr index 2b6509070..09e176adb 100644 --- a/tests/ui/parser/suggest_misplaced_generics/struct.stderr +++ b/tests/ui/parser/suggest_misplaced_generics/struct.stderr @@ -10,5 +10,5 @@ LL - struct<T> Foo { x: T } LL + struct Foo<T> { x: T } | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/suggest_misplaced_generics/trait.stderr b/tests/ui/parser/suggest_misplaced_generics/trait.stderr index ac86cfa46..0d0b780d4 100644 --- a/tests/ui/parser/suggest_misplaced_generics/trait.stderr +++ b/tests/ui/parser/suggest_misplaced_generics/trait.stderr @@ -10,5 +10,5 @@ LL - trait<T> Foo { LL + trait Foo<T> { | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/suggest_misplaced_generics/type.stderr b/tests/ui/parser/suggest_misplaced_generics/type.stderr index 22744f6cf..3034535d5 100644 --- a/tests/ui/parser/suggest_misplaced_generics/type.stderr +++ b/tests/ui/parser/suggest_misplaced_generics/type.stderr @@ -10,5 +10,5 @@ LL - type<T> Foo = T; LL + type Foo<T> = T; | -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/trailing-carriage-return-in-string.stderr b/tests/ui/parser/trailing-carriage-return-in-string.stderr index 8a44e0270..fa2677921 100644 --- a/tests/ui/parser/trailing-carriage-return-in-string.stderr +++ b/tests/ui/parser/trailing-carriage-return-in-string.stderr @@ -6,5 +6,5 @@ LL | let bad = "This is \
a test"; | = help: this is an isolated carriage return; consider checking your editor and version control settings -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/trailing-question-in-macro-type.stderr b/tests/ui/parser/trailing-question-in-macro-type.stderr index c096ae04f..e3d33bf25 100644 --- a/tests/ui/parser/trailing-question-in-macro-type.stderr +++ b/tests/ui/parser/trailing-question-in-macro-type.stderr @@ -4,6 +4,6 @@ error[E0425]: cannot find value `o` in this scope LL | fn_expr!{ o?.when(|&i| i > 0)?.when(|&i| i%2 == 0) }; | ^ not found in this scope -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/parser/trait-bounds-not-on-impl.stderr b/tests/ui/parser/trait-bounds-not-on-impl.stderr index 8d2d5e3d7..7f51bd97e 100644 --- a/tests/ui/parser/trait-bounds-not-on-impl.stderr +++ b/tests/ui/parser/trait-bounds-not-on-impl.stderr @@ -4,5 +4,5 @@ error: expected a trait, found type LL | impl Foo + Owned for Bar {} | ^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/trait-object-polytrait-priority.stderr b/tests/ui/parser/trait-object-polytrait-priority.stderr index a6add6079..23ec1e9cf 100644 --- a/tests/ui/parser/trait-object-polytrait-priority.stderr +++ b/tests/ui/parser/trait-object-polytrait-priority.stderr @@ -4,6 +4,6 @@ error[E0178]: expected a path on the left-hand side of `+`, not `&for<'a> Trait< LL | let _: &for<'a> Trait<'a> + 'static; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try adding parentheses: `&(for<'a> Trait<'a> + 'static)` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0178`. diff --git a/tests/ui/parser/trait-pub-assoc-const.stderr b/tests/ui/parser/trait-pub-assoc-const.stderr index c14a2f2ee..436f6a390 100644 --- a/tests/ui/parser/trait-pub-assoc-const.stderr +++ b/tests/ui/parser/trait-pub-assoc-const.stderr @@ -6,6 +6,6 @@ LL | pub const Foo: u32; | = note: trait items always share the visibility of their trait -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0449`. diff --git a/tests/ui/parser/trait-pub-assoc-ty.stderr b/tests/ui/parser/trait-pub-assoc-ty.stderr index 7f6e7350c..279e3a953 100644 --- a/tests/ui/parser/trait-pub-assoc-ty.stderr +++ b/tests/ui/parser/trait-pub-assoc-ty.stderr @@ -6,6 +6,6 @@ LL | pub type Foo; | = note: trait items always share the visibility of their trait -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0449`. diff --git a/tests/ui/parser/trait-pub-method.stderr b/tests/ui/parser/trait-pub-method.stderr index 2bf1d468a..ee8b6f7cb 100644 --- a/tests/ui/parser/trait-pub-method.stderr +++ b/tests/ui/parser/trait-pub-method.stderr @@ -6,6 +6,6 @@ LL | pub fn foo(); | = note: trait items always share the visibility of their trait -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0449`. diff --git a/tests/ui/parser/unbalanced-doublequote.stderr b/tests/ui/parser/unbalanced-doublequote.stderr index 94b300a7b..d40b982da 100644 --- a/tests/ui/parser/unbalanced-doublequote.stderr +++ b/tests/ui/parser/unbalanced-doublequote.stderr @@ -5,6 +5,6 @@ LL | / " LL | | } | |__^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0765`. diff --git a/tests/ui/parser/unclosed-braces.stderr b/tests/ui/parser/unclosed-braces.stderr index cbc5f8de4..acd92ac79 100644 --- a/tests/ui/parser/unclosed-braces.stderr +++ b/tests/ui/parser/unclosed-braces.stderr @@ -13,5 +13,5 @@ LL | } LL | | ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/unclosed-delimiter-in-dep.stderr b/tests/ui/parser/unclosed-delimiter-in-dep.stderr index a46d020b9..1231decd9 100644 --- a/tests/ui/parser/unclosed-delimiter-in-dep.stderr +++ b/tests/ui/parser/unclosed-delimiter-in-dep.stderr @@ -9,5 +9,5 @@ LL | } LL | } | ^ mismatched closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/unclosed_delim_mod.stderr b/tests/ui/parser/unclosed_delim_mod.stderr index a46d020b9..1231decd9 100644 --- a/tests/ui/parser/unclosed_delim_mod.stderr +++ b/tests/ui/parser/unclosed_delim_mod.stderr @@ -9,5 +9,5 @@ LL | } LL | } | ^ mismatched closing delimiter -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/unmatched-delimiter-at-end-of-file.stderr b/tests/ui/parser/unmatched-delimiter-at-end-of-file.stderr index 430a13e6e..c6960892b 100644 --- a/tests/ui/parser/unmatched-delimiter-at-end-of-file.stderr +++ b/tests/ui/parser/unmatched-delimiter-at-end-of-file.stderr @@ -4,5 +4,5 @@ error: this file contains an unclosed delimiter LL | fn foo() { | - unclosed delimiter ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/unmatched-langle-2.stderr b/tests/ui/parser/unmatched-langle-2.stderr index 773bb33d8..9881c6ba5 100644 --- a/tests/ui/parser/unmatched-langle-2.stderr +++ b/tests/ui/parser/unmatched-langle-2.stderr @@ -4,5 +4,5 @@ error: expected `::`, found `(` LL | foo::<Ty<<<i32>(); | ^ expected `::` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/unsafe-foreign-mod.stderr b/tests/ui/parser/unsafe-foreign-mod.stderr index 4acf72c5d..77f6e93be 100644 --- a/tests/ui/parser/unsafe-foreign-mod.stderr +++ b/tests/ui/parser/unsafe-foreign-mod.stderr @@ -4,5 +4,5 @@ error: extern block cannot be declared unsafe LL | unsafe extern "C" { | ^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/unsized.stderr b/tests/ui/parser/unsized.stderr index 3d4ed526b..1bb4aa97d 100644 --- a/tests/ui/parser/unsized.stderr +++ b/tests/ui/parser/unsized.stderr @@ -4,5 +4,5 @@ error: expected `where`, `{`, `(`, or `;` after struct name, found keyword `for` LL | struct S1 for type; | ^^^ expected `where`, `{`, `(`, or `;` after struct name -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/unsized2.stderr b/tests/ui/parser/unsized2.stderr index 17e39b292..10f4c8332 100644 --- a/tests/ui/parser/unsized2.stderr +++ b/tests/ui/parser/unsized2.stderr @@ -4,5 +4,5 @@ error: expected expression, found keyword `type` LL | f<type>(); | ^^^^ expected expression -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/use-ends-with-mod-sep.stderr b/tests/ui/parser/use-ends-with-mod-sep.stderr index bd0d881a0..2f8e09c07 100644 --- a/tests/ui/parser/use-ends-with-mod-sep.stderr +++ b/tests/ui/parser/use-ends-with-mod-sep.stderr @@ -4,5 +4,5 @@ error: expected identifier, found `;` LL | use std::any::; | ^ expected identifier -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/use-unclosed-brace.stderr b/tests/ui/parser/use-unclosed-brace.stderr index ad5bb2de1..6e624cb91 100644 --- a/tests/ui/parser/use-unclosed-brace.stderr +++ b/tests/ui/parser/use-unclosed-brace.stderr @@ -7,5 +7,5 @@ LL | use foo::{bar, baz; LL | fn main() {} | ^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/virtual-structs.stderr b/tests/ui/parser/virtual-structs.stderr index 268fc1057..7b45e77ba 100644 --- a/tests/ui/parser/virtual-structs.stderr +++ b/tests/ui/parser/virtual-structs.stderr @@ -6,5 +6,5 @@ LL | virtual struct SuperStruct { | = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html> -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/where-clauses-no-bounds-or-predicates.stderr b/tests/ui/parser/where-clauses-no-bounds-or-predicates.stderr index b80b0a409..4bd0cc885 100644 --- a/tests/ui/parser/where-clauses-no-bounds-or-predicates.stderr +++ b/tests/ui/parser/where-clauses-no-bounds-or-predicates.stderr @@ -4,5 +4,5 @@ error: expected `:`, found `{` LL | fn foo<'a>() where 'a {} | ^ expected `:` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/parser/while-if-let-without-body.stderr b/tests/ui/parser/while-if-let-without-body.stderr index 2dac45c11..0bd68b7b9 100644 --- a/tests/ui/parser/while-if-let-without-body.stderr +++ b/tests/ui/parser/while-if-let-without-body.stderr @@ -14,5 +14,5 @@ LL | | } LL | } | ^ expected `{` -error: aborting due to previous error +error: aborting due to 1 previous error |