diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-07-09 22:30:26 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-02-10 20:21:39 +0000 |
| commit | f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d (patch) | |
| tree | e97d87013709bda13934fdc452a2a459a069876a /tests/ui/parser | |
| parent | 8c04e395952022a451138dc4dbead6dd6ae65203 (diff) | |
| download | rust-f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d.tar.gz rust-f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d.zip | |
Show diff suggestion format on verbose replacement
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> $DIR/attempted-access-non-fatal.rs:7:15
|
LL | let _ = 2.l;
| ^
|
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
|
LL - let _ = 2.l;
LL + let _ = 2.0f64;
|
```
Diffstat (limited to 'tests/ui/parser')
123 files changed, 877 insertions, 583 deletions
diff --git a/tests/ui/parser/bad-char-literals.stderr b/tests/ui/parser/bad-char-literals.stderr index 5a81ede0336..3513055cb55 100644 --- a/tests/ui/parser/bad-char-literals.stderr +++ b/tests/ui/parser/bad-char-literals.stderr @@ -6,8 +6,9 @@ LL | '''; | help: escape the character | -LL | '\''; - | ~~ +LL - '''; +LL + '\''; + | error: character constant must be escaped: `\n` --> $DIR/bad-char-literals.rs:10:6 @@ -41,8 +42,9 @@ LL | '-␀-'; | help: if you meant to write a string literal, use double quotes | -LL | "-␀-"; - | ~ ~ +LL - '-␀-'; +LL + "-␀-"; + | error: character constant must be escaped: `\t` --> $DIR/bad-char-literals.rs:21:6 diff --git a/tests/ui/parser/bad-crate-name.stderr b/tests/ui/parser/bad-crate-name.stderr index c98a620f123..2218062fa28 100644 --- a/tests/ui/parser/bad-crate-name.stderr +++ b/tests/ui/parser/bad-crate-name.stderr @@ -6,8 +6,9 @@ LL | extern crate krate-name-here; | help: if the original crate name uses dashes you need to use underscores in the code | -LL | extern crate krate_name_here; - | ~ ~ +LL - extern crate krate-name-here; +LL + extern crate krate_name_here; + | error[E0463]: can't find crate for `krate_name_here` --> $DIR/bad-crate-name.rs:1:1 diff --git a/tests/ui/parser/bad-escape-suggest-raw-string.stderr b/tests/ui/parser/bad-escape-suggest-raw-string.stderr index 6dd4ad512a8..5afa1f4a7f8 100644 --- a/tests/ui/parser/bad-escape-suggest-raw-string.stderr +++ b/tests/ui/parser/bad-escape-suggest-raw-string.stderr @@ -7,8 +7,9 @@ LL | let bad = "ab\[c"; = help: for more information, visit <https://doc.rust-lang.org/reference/tokens.html#literals> help: if you meant to write a literal backslash (perhaps escaping in a regular expression), consider a raw string literal | -LL | let bad = r"ab\[c"; - | ~~~~~~~~ +LL - let bad = "ab\[c"; +LL + let bad = r"ab\[c"; + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/bad-let-else-statement.stderr b/tests/ui/parser/bad-let-else-statement.stderr index 79d722bb7ac..ba564529983 100644 --- a/tests/ui/parser/bad-let-else-statement.stderr +++ b/tests/ui/parser/bad-let-else-statement.stderr @@ -225,8 +225,9 @@ LL | let bad = format_args! {""} else { return; }; | help: use parentheses instead of braces for this macro | -LL | let bad = format_args! ("") else { return; }; - | ~ ~ +LL - let bad = format_args! {""} else { return; }; +LL + let bad = format_args! ("") else { return; }; + | error: right curly brace `}` before `else` in a `let...else` statement not allowed --> $DIR/bad-let-else-statement.rs:207:5 @@ -254,8 +255,9 @@ LL | b!(2); = note: this error originates in the macro `b` (in Nightly builds, run with -Z macro-backtrace for more info) help: use parentheses instead of braces for this macro | -LL | let 0 = a! () else { return; }; - | ~~ +LL - let 0 = a! {} else { return; }; +LL + let 0 = a! () else { return; }; + | warning: irrefutable `let...else` pattern --> $DIR/bad-let-else-statement.rs:95:5 diff --git a/tests/ui/parser/bad-lit-suffixes.stderr b/tests/ui/parser/bad-lit-suffixes.stderr index 121db2058f1..704f7363e81 100644 --- a/tests/ui/parser/bad-lit-suffixes.stderr +++ b/tests/ui/parser/bad-lit-suffixes.stderr @@ -30,9 +30,11 @@ LL | #[must_use = "string"suffix] | help: the following are the possible correct uses | -LL | #[must_use = "reason"] +LL - #[must_use = "string"suffix] +LL + #[must_use = "reason"] | -LL | #[must_use] +LL - #[must_use = "string"suffix] +LL + #[must_use] | error: suffixes on string literals are invalid diff --git a/tests/ui/parser/byte-literals.stderr b/tests/ui/parser/byte-literals.stderr index 25e31995441..fe3cfb23de8 100644 --- a/tests/ui/parser/byte-literals.stderr +++ b/tests/ui/parser/byte-literals.stderr @@ -39,8 +39,9 @@ LL | b'''; | help: escape the character | -LL | b'\''; - | ~~ +LL - b'''; +LL + b'\''; + | error: non-ASCII character in byte literal --> $DIR/byte-literals.rs:10:7 @@ -50,8 +51,9 @@ LL | b'é'; | help: if you meant to use the unicode code point for 'é', use a \xHH escape | -LL | b'\xE9'; - | ~~~~ +LL - b'é'; +LL + b'\xE9'; + | error[E0763]: unterminated byte constant --> $DIR/byte-literals.rs:11:6 diff --git a/tests/ui/parser/byte-string-literals.stderr b/tests/ui/parser/byte-string-literals.stderr index 24e0eaac8fa..08633742557 100644 --- a/tests/ui/parser/byte-string-literals.stderr +++ b/tests/ui/parser/byte-string-literals.stderr @@ -28,8 +28,9 @@ LL | b"é"; | help: if you meant to use the unicode code point for 'é', use a \xHH escape | -LL | b"\xE9"; - | ~~~~ +LL - b"é"; +LL + b"\xE9"; + | error: non-ASCII character in raw byte string literal --> $DIR/byte-string-literals.rs:7:10 diff --git a/tests/ui/parser/char/whitespace-character-literal.stderr b/tests/ui/parser/char/whitespace-character-literal.stderr index f273b5d61d5..53f2eb3ecba 100644 --- a/tests/ui/parser/char/whitespace-character-literal.stderr +++ b/tests/ui/parser/char/whitespace-character-literal.stderr @@ -11,8 +11,9 @@ LL | let _hair_space_around = ' x'; | ^^ help: consider removing the non-printing characters | -LL | let _hair_space_around = 'x'; - | ~ +LL - let _hair_space_around = ' x'; +LL + let _hair_space_around = 'x'; + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/const-param-decl-on-type-instead-of-impl.stderr b/tests/ui/parser/const-param-decl-on-type-instead-of-impl.stderr index 104dbd02685..855163e3d3b 100644 --- a/tests/ui/parser/const-param-decl-on-type-instead-of-impl.stderr +++ b/tests/ui/parser/const-param-decl-on-type-instead-of-impl.stderr @@ -6,8 +6,9 @@ LL | impl NInts<const N: usize> {} | help: `const` parameters must be declared for the `impl` | -LL | impl<const N: usize> NInts<N> {} - | ++++++++++++++++ ~ +LL - impl NInts<const N: usize> {} +LL + impl<const N: usize> NInts<N> {} + | error: unexpected `const` parameter declaration --> $DIR/const-param-decl-on-type-instead-of-impl.rs:8:17 diff --git a/tests/ui/parser/default-on-wrong-item-kind.stderr b/tests/ui/parser/default-on-wrong-item-kind.stderr index 392c85e0c43..56641565b16 100644 --- a/tests/ui/parser/default-on-wrong-item-kind.stderr +++ b/tests/ui/parser/default-on-wrong-item-kind.stderr @@ -159,8 +159,9 @@ LL | default const foo: u8; = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html help: try using a static value | -LL | static foo: u8; - | ~~~~~~ +LL - default const foo: u8; +LL + static foo: u8; + | error: a module cannot be `default` --> $DIR/default-on-wrong-item-kind.rs:41:5 diff --git a/tests/ui/parser/do-catch-suggests-try.stderr b/tests/ui/parser/do-catch-suggests-try.stderr index fd3406ae29f..2eaab836075 100644 --- a/tests/ui/parser/do-catch-suggests-try.stderr +++ b/tests/ui/parser/do-catch-suggests-try.stderr @@ -7,8 +7,9 @@ LL | let _: Option<()> = do catch {}; = note: following RFC #2388, the new non-placeholder syntax is `try` help: replace with the new syntax | -LL | let _: Option<()> = try {}; - | ~~~ +LL - let _: Option<()> = do catch {}; +LL + let _: Option<()> = try {}; + | error[E0308]: mismatched types --> $DIR/do-catch-suggests-try.rs:9:33 diff --git a/tests/ui/parser/dotdotdot-expr.stderr b/tests/ui/parser/dotdotdot-expr.stderr index 208c04bd3df..f0bc57264a6 100644 --- a/tests/ui/parser/dotdotdot-expr.stderr +++ b/tests/ui/parser/dotdotdot-expr.stderr @@ -6,12 +6,14 @@ LL | let _redemptive = 1...21; | help: use `..` for an exclusive range | -LL | let _redemptive = 1..21; - | ~~ +LL - let _redemptive = 1...21; +LL + let _redemptive = 1..21; + | help: or `..=` for an inclusive range | -LL | let _redemptive = 1..=21; - | ~~~ +LL - let _redemptive = 1...21; +LL + let _redemptive = 1..=21; + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/duplicate-where-clauses.stderr b/tests/ui/parser/duplicate-where-clauses.stderr index 8250d4f1e05..298cdab0c68 100644 --- a/tests/ui/parser/duplicate-where-clauses.stderr +++ b/tests/ui/parser/duplicate-where-clauses.stderr @@ -8,8 +8,9 @@ LL | struct A where (): Sized where (): Sized {} | help: consider joining the two `where` clauses into one | -LL | struct A where (): Sized, (): Sized {} - | ~ +LL - struct A where (): Sized where (): Sized {} +LL + struct A where (): Sized, (): Sized {} + | error: cannot define duplicate `where` clauses on an item --> $DIR/duplicate-where-clauses.rs:4:30 @@ -21,8 +22,9 @@ LL | fn b() where (): Sized where (): Sized {} | help: consider joining the two `where` clauses into one | -LL | fn b() where (): Sized, (): Sized {} - | ~ +LL - fn b() where (): Sized where (): Sized {} +LL + fn b() where (): Sized, (): Sized {} + | error: cannot define duplicate `where` clauses on an item --> $DIR/duplicate-where-clauses.rs:7:30 @@ -34,8 +36,9 @@ LL | enum C where (): Sized where (): Sized {} | help: consider joining the two `where` clauses into one | -LL | enum C where (): Sized, (): Sized {} - | ~ +LL - enum C where (): Sized where (): Sized {} +LL + enum C where (): Sized, (): Sized {} + | error: cannot define duplicate `where` clauses on an item --> $DIR/duplicate-where-clauses.rs:10:33 @@ -47,8 +50,9 @@ LL | struct D where (): Sized, where (): Sized {} | help: consider joining the two `where` clauses into one | -LL | struct D where (): Sized, (): Sized {} - | ~ +LL - struct D where (): Sized, where (): Sized {} +LL + struct D where (): Sized, (): Sized {} + | error: cannot define duplicate `where` clauses on an item --> $DIR/duplicate-where-clauses.rs:13:31 @@ -60,8 +64,9 @@ LL | fn e() where (): Sized, where (): Sized {} | help: consider joining the two `where` clauses into one | -LL | fn e() where (): Sized, (): Sized {} - | ~ +LL - fn e() where (): Sized, where (): Sized {} +LL + fn e() where (): Sized, (): Sized {} + | error: cannot define duplicate `where` clauses on an item --> $DIR/duplicate-where-clauses.rs:16:31 @@ -73,8 +78,9 @@ LL | enum F where (): Sized, where (): Sized {} | help: consider joining the two `where` clauses into one | -LL | enum F where (): Sized, (): Sized {} - | ~ +LL - enum F where (): Sized, where (): Sized {} +LL + enum F where (): Sized, (): Sized {} + | error: aborting due to 6 previous errors diff --git a/tests/ui/parser/emoji-identifiers.stderr b/tests/ui/parser/emoji-identifiers.stderr index 536afc53f0c..f0e90082bff 100644 --- a/tests/ui/parser/emoji-identifiers.stderr +++ b/tests/ui/parser/emoji-identifiers.stderr @@ -6,8 +6,9 @@ LL | let _ = i_like_to_😄_a_lot() ➖ 4; | help: Unicode character '➖' (Heavy Minus Sign) looks like '-' (Minus/Hyphen), but it is not | -LL | let _ = i_like_to_😄_a_lot() - 4; - | ~ +LL - let _ = i_like_to_😄_a_lot() ➖ 4; +LL + let _ = i_like_to_😄_a_lot() - 4; + | error: identifiers cannot contain emoji: `ABig👩👩👧👧Family` --> $DIR/emoji-identifiers.rs:1:8 @@ -80,8 +81,9 @@ LL | fn full_of_✨() -> 👀 { | ^^^^^^^^^^^^^^^^^^^^^ help: there is an associated function `full_of_✨` with a similar name | -LL | 👀::full_of_✨() - | ~~~~~~~~~~ +LL - 👀::full_of✨() +LL + 👀::full_of_✨() + | error[E0425]: cannot find function `i_like_to_😄_a_lot` in this scope --> $DIR/emoji-identifiers.rs:13:13 diff --git a/tests/ui/parser/eq-gt-to-gt-eq.stderr b/tests/ui/parser/eq-gt-to-gt-eq.stderr index 73f465f7b9b..aa47ddecce9 100644 --- a/tests/ui/parser/eq-gt-to-gt-eq.stderr +++ b/tests/ui/parser/eq-gt-to-gt-eq.stderr @@ -11,8 +11,9 @@ LL | if a => b {} | ^ help: you might have meant to write a "greater than or equal to" comparison | -LL | if a >= b {} - | ~~ +LL - if a => b {} +LL + if a >= b {} + | error: expected `{`, found `=>` --> $DIR/eq-gt-to-gt-eq.rs:13:10 @@ -27,8 +28,9 @@ LL | if a => 1 {} | ^ help: you might have meant to write a "greater than or equal to" comparison | -LL | if a >= 1 {} - | ~~ +LL - if a => 1 {} +LL + if a >= 1 {} + | error: expected `{`, found `=>` --> $DIR/eq-gt-to-gt-eq.rs:18:10 @@ -43,8 +45,9 @@ LL | if 1 => a {} | ^ help: you might have meant to write a "greater than or equal to" comparison | -LL | if 1 >= a {} - | ~~ +LL - if 1 => a {} +LL + if 1 >= a {} + | error: expected `{`, found `=>` --> $DIR/eq-gt-to-gt-eq.rs:24:10 @@ -59,8 +62,9 @@ LL | if a => b && a != b {} | ^ help: you might have meant to write a "greater than or equal to" comparison | -LL | if a >= b && a != b {} - | ~~ +LL - if a => b && a != b {} +LL + if a >= b && a != b {} + | error: expected `{`, found `=>` --> $DIR/eq-gt-to-gt-eq.rs:30:20 @@ -75,8 +79,9 @@ LL | if a != b && a => b {} | ^^^^^^^^^^^ help: you might have meant to write a "greater than or equal to" comparison | -LL | if a != b && a >= b {} - | ~~ +LL - if a != b && a => b {} +LL + if a != b && a >= b {} + | error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `=>` --> $DIR/eq-gt-to-gt-eq.rs:36:15 @@ -86,8 +91,9 @@ LL | let _ = a => b; | help: you might have meant to write a "greater than or equal to" comparison | -LL | let _ = a >= b; - | ~~ +LL - let _ = a => b; +LL + let _ = a >= b; + | error: expected one of `!`, `.`, `::`, `?`, `{`, or an operator, found `=>` --> $DIR/eq-gt-to-gt-eq.rs:42:13 @@ -99,8 +105,9 @@ LL | match a => b { | help: you might have meant to write a "greater than or equal to" comparison | -LL | match a >= b { - | ~~ +LL - match a => b { +LL + match a >= b { + | error: aborting due to 7 previous errors diff --git a/tests/ui/parser/expr-rarrow-call.stderr b/tests/ui/parser/expr-rarrow-call.stderr index 221e3a74d79..2e168ca26fe 100644 --- a/tests/ui/parser/expr-rarrow-call.stderr +++ b/tests/ui/parser/expr-rarrow-call.stderr @@ -7,8 +7,9 @@ LL | named->foo; = help: the `.` operator will dereference the value if needed help: try using `.` instead | -LL | named.foo; - | ~ +LL - named->foo; +LL + named.foo; + | error: `->` used for field access or method call --> $DIR/expr-rarrow-call.rs:18:12 @@ -19,8 +20,9 @@ LL | unnamed->0; = help: the `.` operator will dereference the value if needed help: try using `.` instead | -LL | unnamed.0; - | ~ +LL - unnamed->0; +LL + unnamed.0; + | error: `->` used for field access or method call --> $DIR/expr-rarrow-call.rs:22:6 @@ -31,8 +33,9 @@ LL | t->0; = help: the `.` operator will dereference the value if needed help: try using `.` instead | -LL | t.0; - | ~ +LL - t->0; +LL + t.0; + | error: `->` used for field access or method call --> $DIR/expr-rarrow-call.rs:23:6 @@ -43,8 +46,9 @@ LL | t->1; = help: the `.` operator will dereference the value if needed help: try using `.` instead | -LL | t.1; - | ~ +LL - t->1; +LL + t.1; + | error: `->` used for field access or method call --> $DIR/expr-rarrow-call.rs:30:8 @@ -55,8 +59,9 @@ LL | foo->clone(); = help: the `.` operator will dereference the value if needed help: try using `.` instead | -LL | foo.clone(); - | ~ +LL - foo->clone(); +LL + foo.clone(); + | error: aborting due to 5 previous errors diff --git a/tests/ui/parser/extern-crate-unexpected-token.stderr b/tests/ui/parser/extern-crate-unexpected-token.stderr index 951b0274b0d..3d48f0adfa1 100644 --- a/tests/ui/parser/extern-crate-unexpected-token.stderr +++ b/tests/ui/parser/extern-crate-unexpected-token.stderr @@ -6,8 +6,9 @@ LL | extern crte foo; | help: there is a keyword `crate` with a similar name | -LL | extern crate foo; - | ~~~~~ +LL - extern crte foo; +LL + extern crate foo; + | 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 03826e4a93b..2ee905429c4 100644 --- a/tests/ui/parser/extern-no-fn.stderr +++ b/tests/ui/parser/extern-no-fn.stderr @@ -11,8 +11,9 @@ LL | } | help: if you meant to call a macro, try | -LL | f!(); - | ~~ +LL - f(); +LL + f!(); + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/fn-body-eq-expr-semi.stderr b/tests/ui/parser/fn-body-eq-expr-semi.stderr index f1255d8642a..adcb4fef0a3 100644 --- a/tests/ui/parser/fn-body-eq-expr-semi.stderr +++ b/tests/ui/parser/fn-body-eq-expr-semi.stderr @@ -6,8 +6,9 @@ LL | fn foo() = 42; | help: surround the expression with `{` and `}` instead of `=` and `;` | -LL | fn foo() { 42 } - | ~ ~ +LL - fn foo() = 42; +LL + fn foo() { 42 } + | error: function body cannot be `= expression;` --> $DIR/fn-body-eq-expr-semi.rs:5:20 @@ -17,8 +18,9 @@ LL | fn bar() -> u8 = 42; | help: surround the expression with `{` and `}` instead of `=` and `;` | -LL | fn bar() -> u8 { 42 } - | ~ ~ +LL - fn bar() -> u8 = 42; +LL + fn bar() -> u8 { 42 } + | error: function body cannot be `= expression;` --> $DIR/fn-body-eq-expr-semi.rs:9:14 @@ -28,8 +30,9 @@ LL | fn foo() = 42; | help: surround the expression with `{` and `}` instead of `=` and `;` | -LL | fn foo() { 42 } - | ~ ~ +LL - fn foo() = 42; +LL + fn foo() { 42 } + | error: function body cannot be `= expression;` --> $DIR/fn-body-eq-expr-semi.rs:11:20 @@ -39,8 +42,9 @@ LL | fn bar() -> u8 = 42; | help: surround the expression with `{` and `}` instead of `=` and `;` | -LL | fn bar() -> u8 { 42 } - | ~ ~ +LL - fn bar() -> u8 = 42; +LL + fn bar() -> u8 { 42 } + | error: function body cannot be `= expression;` --> $DIR/fn-body-eq-expr-semi.rs:16:14 @@ -50,8 +54,9 @@ LL | fn foo() = 42; | help: surround the expression with `{` and `}` instead of `=` and `;` | -LL | fn foo() { 42 } - | ~ ~ +LL - fn foo() = 42; +LL + fn foo() { 42 } + | error: function body cannot be `= expression;` --> $DIR/fn-body-eq-expr-semi.rs:17:20 @@ -61,8 +66,9 @@ LL | fn bar() -> u8 = 42; | help: surround the expression with `{` and `}` instead of `=` and `;` | -LL | fn bar() -> u8 { 42 } - | ~ ~ +LL - fn bar() -> u8 = 42; +LL + fn bar() -> u8 { 42 } + | error: function body cannot be `= expression;` --> $DIR/fn-body-eq-expr-semi.rs:21:14 @@ -72,8 +78,9 @@ LL | fn foo() = 42; | help: surround the expression with `{` and `}` instead of `=` and `;` | -LL | fn foo() { 42 } - | ~ ~ +LL - fn foo() = 42; +LL + fn foo() { 42 } + | error: function body cannot be `= expression;` --> $DIR/fn-body-eq-expr-semi.rs:22:20 @@ -83,8 +90,9 @@ LL | fn bar() -> u8 = 42; | help: surround the expression with `{` and `}` instead of `=` and `;` | -LL | fn bar() -> u8 { 42 } - | ~ ~ +LL - fn bar() -> u8 = 42; +LL + fn bar() -> u8 { 42 } + | error: incorrect function inside `extern` block --> $DIR/fn-body-eq-expr-semi.rs:9:8 diff --git a/tests/ui/parser/fn-colon-return-type.stderr b/tests/ui/parser/fn-colon-return-type.stderr index c1cdf4d4975..d6d30c5fd07 100644 --- a/tests/ui/parser/fn-colon-return-type.stderr +++ b/tests/ui/parser/fn-colon-return-type.stderr @@ -6,8 +6,9 @@ LL | fn foo(x: i32): i32 { | help: use `->` instead | -LL | fn foo(x: i32) -> i32 { - | ~~ +LL - fn foo(x: i32): i32 { +LL + fn foo(x: i32) -> i32 { + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/foreign-const-semantic-fail.stderr b/tests/ui/parser/foreign-const-semantic-fail.stderr index d317847f98a..b2240738c49 100644 --- a/tests/ui/parser/foreign-const-semantic-fail.stderr +++ b/tests/ui/parser/foreign-const-semantic-fail.stderr @@ -7,8 +7,9 @@ LL | const A: isize; = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html help: try using a static value | -LL | static A: isize; - | ~~~~~~ +LL - const A: isize; +LL + static A: isize; + | error: extern items cannot be `const` --> $DIR/foreign-const-semantic-fail.rs:6:11 @@ -19,8 +20,9 @@ LL | const B: isize = 42; = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html help: try using a static value | -LL | static B: isize = 42; - | ~~~~~~ +LL - const B: isize = 42; +LL + static B: isize = 42; + | error: incorrect `static` inside `extern` block --> $DIR/foreign-const-semantic-fail.rs:6:11 diff --git a/tests/ui/parser/foreign-const-syntactic-fail.stderr b/tests/ui/parser/foreign-const-syntactic-fail.stderr index 7da2c019022..f7466d5d6cd 100644 --- a/tests/ui/parser/foreign-const-syntactic-fail.stderr +++ b/tests/ui/parser/foreign-const-syntactic-fail.stderr @@ -7,8 +7,9 @@ LL | const A: isize; = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html help: try using a static value | -LL | static A: isize; - | ~~~~~~ +LL - const A: isize; +LL + static A: isize; + | error: extern items cannot be `const` --> $DIR/foreign-const-syntactic-fail.rs:8:11 @@ -19,8 +20,9 @@ LL | const B: isize = 42; = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html help: try using a static value | -LL | static B: isize = 42; - | ~~~~~~ +LL - const B: isize = 42; +LL + static B: isize = 42; + | error: aborting due to 2 previous errors diff --git a/tests/ui/parser/increment-autofix-2.stderr b/tests/ui/parser/increment-autofix-2.stderr index 11e985480d6..3fee9672796 100644 --- a/tests/ui/parser/increment-autofix-2.stderr +++ b/tests/ui/parser/increment-autofix-2.stderr @@ -6,8 +6,9 @@ LL | i++; | help: use `+= 1` instead | -LL | i += 1; - | ~~~~ +LL - i++; +LL + i += 1; + | error: Rust has no postfix increment operator --> $DIR/increment-autofix-2.rs:19:12 @@ -19,8 +20,9 @@ LL | while i++ < 5 { | help: use `+= 1` instead | -LL | while { let tmp = i; i += 1; tmp } < 5 { - | +++++++++++ ~~~~~~~~~~~~~~~ +LL - while i++ < 5 { +LL + while { let tmp = i; i += 1; tmp } < 5 { + | error: Rust has no postfix increment operator --> $DIR/increment-autofix-2.rs:27:8 @@ -30,8 +32,9 @@ LL | tmp++; | help: use `+= 1` instead | -LL | tmp += 1; - | ~~~~ +LL - tmp++; +LL + tmp += 1; + | error: Rust has no postfix increment operator --> $DIR/increment-autofix-2.rs:33:14 @@ -43,8 +46,9 @@ LL | while tmp++ < 5 { | help: use `+= 1` instead | -LL | while { let tmp_ = tmp; tmp += 1; tmp_ } < 5 { - | ++++++++++++ ~~~~~~~~~~~~~~~~~~ +LL - while tmp++ < 5 { +LL + while { let tmp_ = tmp; tmp += 1; tmp_ } < 5 { + | error: Rust has no postfix increment operator --> $DIR/increment-autofix-2.rs:41:16 @@ -54,8 +58,9 @@ LL | foo.bar.qux++; | help: use `+= 1` instead | -LL | foo.bar.qux += 1; - | ~~~~ +LL - foo.bar.qux++; +LL + foo.bar.qux += 1; + | error: Rust has no postfix increment operator --> $DIR/increment-autofix-2.rs:51:10 @@ -65,8 +70,9 @@ LL | s.tmp++; | help: use `+= 1` instead | -LL | s.tmp += 1; - | ~~~~ +LL - s.tmp++; +LL + s.tmp += 1; + | error: Rust has no prefix increment operator --> $DIR/increment-autofix-2.rs:58:5 diff --git a/tests/ui/parser/increment-autofix.stderr b/tests/ui/parser/increment-autofix.stderr index 1dc69fd9f46..ffff91abee9 100644 --- a/tests/ui/parser/increment-autofix.stderr +++ b/tests/ui/parser/increment-autofix.stderr @@ -20,8 +20,9 @@ LL | while ++i < 5 { | help: use `+= 1` instead | -LL | while { i += 1; i } < 5 { - | ~ +++++++++ +LL - while ++i < 5 { +LL + while { i += 1; i } < 5 { + | error: Rust has no prefix increment operator --> $DIR/increment-autofix.rs:19:5 @@ -45,8 +46,9 @@ LL | while ++tmp < 5 { | help: use `+= 1` instead | -LL | while { tmp += 1; tmp } < 5 { - | ~ +++++++++++ +LL - while ++tmp < 5 { +LL + while { tmp += 1; tmp } < 5 { + | error: aborting due to 4 previous errors diff --git a/tests/ui/parser/intersection-patterns-1.stderr b/tests/ui/parser/intersection-patterns-1.stderr index ed2466b21a7..c191b46fa45 100644 --- a/tests/ui/parser/intersection-patterns-1.stderr +++ b/tests/ui/parser/intersection-patterns-1.stderr @@ -9,8 +9,9 @@ LL | Some(x) @ y => {} | help: switch the order | -LL | y @ Some(x) => {} - | ~~~~~~~~~~~ +LL - Some(x) @ y => {} +LL + y @ Some(x) => {} + | error: pattern on wrong side of `@` --> $DIR/intersection-patterns-1.rs:27:9 @@ -23,8 +24,9 @@ LL | 1 ..= 5 @ e => {} | help: switch the order | -LL | e @ 1..=5 => {} - | ~~~~~~~~~ +LL - 1 ..= 5 @ e => {} +LL + e @ 1..=5 => {} + | error: aborting due to 2 previous errors diff --git a/tests/ui/parser/issues/issue-100197-mut-let.stderr b/tests/ui/parser/issues/issue-100197-mut-let.stderr index 252ed7d0715..e43d5f68607 100644 --- a/tests/ui/parser/issues/issue-100197-mut-let.stderr +++ b/tests/ui/parser/issues/issue-100197-mut-let.stderr @@ -6,8 +6,9 @@ LL | mut let _x = 123; | help: switch the order of `mut` and `let` | -LL | let mut _x = 123; - | ~~~~~~~ +LL - mut let _x = 123; +LL + let mut _x = 123; + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-101477-enum.stderr b/tests/ui/parser/issues/issue-101477-enum.stderr index 8d4efdd17f7..c6dadeab8b3 100644 --- a/tests/ui/parser/issues/issue-101477-enum.stderr +++ b/tests/ui/parser/issues/issue-101477-enum.stderr @@ -7,8 +7,9 @@ LL | B == 2 = help: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }` help: try using `=` instead | -LL | B = 2 - | ~ +LL - B == 2 +LL + B = 2 + | error: expected item, found `==` --> $DIR/issue-101477-enum.rs:6:7 diff --git a/tests/ui/parser/issues/issue-101477-let.stderr b/tests/ui/parser/issues/issue-101477-let.stderr index d2671abbdea..59e90c8102f 100644 --- a/tests/ui/parser/issues/issue-101477-let.stderr +++ b/tests/ui/parser/issues/issue-101477-let.stderr @@ -6,8 +6,9 @@ LL | let x == 2; | help: try using `=` instead | -LL | let x = 2; - | ~ +LL - let x == 2; +LL + let x = 2; + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-102806.stderr b/tests/ui/parser/issues/issue-102806.stderr index ba8174a823b..cd447c6dec0 100644 --- a/tests/ui/parser/issues/issue-102806.stderr +++ b/tests/ui/parser/issues/issue-102806.stderr @@ -6,8 +6,9 @@ LL | let _ = V3 { z: 0.0, ...v}; | help: use `..` to fill in the rest of the fields | -LL | let _ = V3 { z: 0.0, ..v}; - | ~~ +LL - let _ = V3 { z: 0.0, ...v}; +LL + let _ = V3 { z: 0.0, ..v}; + | error: expected `..`, found `...` --> $DIR/issue-102806.rs:14:26 @@ -17,8 +18,9 @@ LL | let _ = V3 { z: 0.0, ...Default::default() }; | help: use `..` to fill in the rest of the fields | -LL | let _ = V3 { z: 0.0, ..Default::default() }; - | ~~ +LL - let _ = V3 { z: 0.0, ...Default::default() }; +LL + let _ = V3 { z: 0.0, ..Default::default() }; + | error: expected identifier, found `...` --> $DIR/issue-102806.rs:17:26 @@ -36,8 +38,9 @@ LL | let V3 { z: val, ... } = v; | help: to omit remaining fields, use `..` | -LL | let V3 { z: val, .. } = v; - | ~~ +LL - let V3 { z: val, ... } = v; +LL + let V3 { z: val, .. } = v; + | error[E0063]: missing fields `x` and `y` in initializer of `V3` --> $DIR/issue-102806.rs:17:13 diff --git a/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.stderr b/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.stderr index b0d8b03ae08..97a73b4fd5e 100644 --- a/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.stderr +++ b/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.stderr @@ -6,8 +6,9 @@ LL | struct Apple((Apple, Option(Banana ? Citron))); | help: if you meant to express that the type might not contain a value, use the `Option` wrapper type | -LL | struct Apple((Apple, Option(Option<Banana > Citron))); - | +++++++ ~ +LL - struct Apple((Apple, Option(Banana ? Citron))); +LL + struct Apple((Apple, Option(Option<Banana > Citron))); + | error: expected one of `)` or `,`, found `Citron` --> $DIR/issue-103748-ICE-wrong-braces.rs:3:38 @@ -31,8 +32,9 @@ LL | struct Apple((Apple, Option(Banana ? Citron))); | help: use angle brackets instead | -LL | struct Apple((Apple, Option<Banana ? Citron>)); - | ~ ~ +LL - struct Apple((Apple, Option(Banana ? Citron))); +LL + struct Apple((Apple, Option<Banana ? Citron>)); + | error[E0072]: recursive type `Apple` has infinite size --> $DIR/issue-103748-ICE-wrong-braces.rs:3:1 diff --git a/tests/ui/parser/issues/issue-104867-inc-dec-2.stderr b/tests/ui/parser/issues/issue-104867-inc-dec-2.stderr index 4e2d0546851..f2412dda050 100644 --- a/tests/ui/parser/issues/issue-104867-inc-dec-2.stderr +++ b/tests/ui/parser/issues/issue-104867-inc-dec-2.stderr @@ -6,8 +6,9 @@ LL | let _ = i + ++i; | help: use `+= 1` instead | -LL | let _ = i + { i += 1; i }; - | ~ +++++++++ +LL - let _ = i + ++i; +LL + let _ = i + { i += 1; i }; + | error: Rust has no prefix increment operator --> $DIR/issue-104867-inc-dec-2.rs:8:13 @@ -17,8 +18,9 @@ LL | let _ = ++i + i; | help: use `+= 1` instead | -LL | let _ = { i += 1; i } + i; - | ~ +++++++++ +LL - let _ = ++i + i; +LL + let _ = { i += 1; i } + i; + | error: Rust has no prefix increment operator --> $DIR/issue-104867-inc-dec-2.rs:13:13 @@ -28,8 +30,9 @@ LL | let _ = ++i + ++i; | help: use `+= 1` instead | -LL | let _ = { i += 1; i } + ++i; - | ~ +++++++++ +LL - let _ = ++i + ++i; +LL + let _ = { i += 1; i } + ++i; + | error: Rust has no postfix increment operator --> $DIR/issue-104867-inc-dec-2.rs:18:18 @@ -45,8 +48,9 @@ LL | let _ = i++ + i; | help: use `+= 1` instead | -LL | let _ = { let tmp = i; i += 1; tmp } + i; - | +++++++++++ ~~~~~~~~~~~~~~~ +LL - let _ = i++ + i; +LL + let _ = { let tmp = i; i += 1; tmp } + i; + | error: Rust has no postfix increment operator --> $DIR/issue-104867-inc-dec-2.rs:29:14 @@ -56,8 +60,9 @@ LL | let _ = i++ + i++; | help: use `+= 1` instead | -LL | let _ = { let tmp = i; i += 1; tmp } + i++; - | +++++++++++ ~~~~~~~~~~~~~~~ +LL - let _ = i++ + i++; +LL + let _ = { let tmp = i; i += 1; tmp } + i++; + | error: Rust has no prefix increment operator --> $DIR/issue-104867-inc-dec-2.rs:34:13 @@ -67,8 +72,9 @@ LL | let _ = ++i + i++; | help: use `+= 1` instead | -LL | let _ = { i += 1; i } + i++; - | ~ +++++++++ +LL - let _ = ++i + i++; +LL + let _ = { i += 1; i } + i++; + | error: Rust has no postfix increment operator --> $DIR/issue-104867-inc-dec-2.rs:39:14 @@ -78,8 +84,9 @@ LL | let _ = i++ + ++i; | help: use `+= 1` instead | -LL | let _ = { let tmp = i; i += 1; tmp } + ++i; - | +++++++++++ ~~~~~~~~~~~~~~~ +LL - let _ = i++ + ++i; +LL + let _ = { let tmp = i; i += 1; tmp } + ++i; + | error: Rust has no postfix increment operator --> $DIR/issue-104867-inc-dec-2.rs:44:24 @@ -89,8 +96,9 @@ LL | let _ = (1 + 2 + i)++; | help: use `+= 1` instead | -LL | let _ = { let tmp = (1 + 2 + i); (1 + 2 + i) += 1; tmp }; - | +++++++++++ ~~~~~~~~~~~~~~~~~~~~~~~~~ +LL - let _ = (1 + 2 + i)++; +LL + let _ = { let tmp = (1 + 2 + i); (1 + 2 + i) += 1; tmp }; + | error: Rust has no postfix increment operator --> $DIR/issue-104867-inc-dec-2.rs:49:15 @@ -100,8 +108,9 @@ LL | let _ = (i++ + 1) + 2; | help: use `+= 1` instead | -LL | let _ = ({ let tmp = i; i += 1; tmp } + 1) + 2; - | +++++++++++ ~~~~~~~~~~~~~~~ +LL - let _ = (i++ + 1) + 2; +LL + let _ = ({ let tmp = i; i += 1; tmp } + 1) + 2; + | error: aborting due to 10 previous errors diff --git a/tests/ui/parser/issues/issue-104867-inc-dec.stderr b/tests/ui/parser/issues/issue-104867-inc-dec.stderr index 78bfd3e82f0..309f8b56933 100644 --- a/tests/ui/parser/issues/issue-104867-inc-dec.stderr +++ b/tests/ui/parser/issues/issue-104867-inc-dec.stderr @@ -6,8 +6,9 @@ LL | i++; | help: use `+= 1` instead | -LL | i += 1; - | ~~~~ +LL - i++; +LL + i += 1; + | error: Rust has no postfix increment operator --> $DIR/issue-104867-inc-dec.rs:12:8 @@ -17,8 +18,9 @@ LL | s.x++; | help: use `+= 1` instead | -LL | s.x += 1; - | ~~~~ +LL - s.x++; +LL + s.x += 1; + | error: Rust has no postfix increment operator --> $DIR/issue-104867-inc-dec.rs:17:9 @@ -28,8 +30,9 @@ LL | if i++ == 1 {} | help: use `+= 1` instead | -LL | if { let tmp = i; i += 1; tmp } == 1 {} - | +++++++++++ ~~~~~~~~~~~~~~~ +LL - if i++ == 1 {} +LL + if { let tmp = i; i += 1; tmp } == 1 {} + | error: Rust has no prefix increment operator --> $DIR/issue-104867-inc-dec.rs:22:5 @@ -51,8 +54,9 @@ LL | if ++i == 1 { } | help: use `+= 1` instead | -LL | if { i += 1; i } == 1 { } - | ~ +++++++++ +LL - if ++i == 1 { } +LL + if { i += 1; i } == 1 { } + | error: Rust has no postfix increment operator --> $DIR/issue-104867-inc-dec.rs:33:6 @@ -62,8 +66,9 @@ LL | i++; | help: use `+= 1` instead | -LL | i += 1; - | ~~~~ +LL - i++; +LL + i += 1; + | error: Rust has no prefix increment operator --> $DIR/issue-104867-inc-dec.rs:41:5 diff --git a/tests/ui/parser/issues/issue-105366.stderr b/tests/ui/parser/issues/issue-105366.stderr index 18c04dfaf20..d8c79a0e0ea 100644 --- a/tests/ui/parser/issues/issue-105366.stderr +++ b/tests/ui/parser/issues/issue-105366.stderr @@ -6,8 +6,9 @@ LL | fn From<i32> for Foo { | help: replace `fn` with `impl` here | -LL | impl From<i32> for Foo { - | ~~~~ +LL - fn From<i32> for Foo { +LL + impl From<i32> for Foo { + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-108495-dec.stderr b/tests/ui/parser/issues/issue-108495-dec.stderr index 85b29038f7c..b058dae4a6f 100644 --- a/tests/ui/parser/issues/issue-108495-dec.stderr +++ b/tests/ui/parser/issues/issue-108495-dec.stderr @@ -12,8 +12,9 @@ LL | let _ = i-- + i--; | help: use `-= 1` instead | -LL | let _ = { let tmp = i; i -= 1; tmp } + i--; - | +++++++++++ ~~~~~~~~~~~~~~~ +LL - let _ = i-- + i--; +LL + let _ = { let tmp = i; i -= 1; tmp } + i--; + | error: Rust has no postfix decrement operator --> $DIR/issue-108495-dec.rs:14:20 @@ -29,8 +30,9 @@ LL | let _ = i-- + --i; | help: use `-= 1` instead | -LL | let _ = { let tmp = i; i -= 1; tmp } + --i; - | +++++++++++ ~~~~~~~~~~~~~~~ +LL - let _ = i-- + --i; +LL + let _ = { let tmp = i; i -= 1; tmp } + --i; + | error: Rust has no postfix decrement operator --> $DIR/issue-108495-dec.rs:24:24 @@ -40,8 +42,9 @@ LL | let _ = (1 + 2 + i)--; | help: use `-= 1` instead | -LL | let _ = { let tmp = (1 + 2 + i); (1 + 2 + i) -= 1; tmp }; - | +++++++++++ ~~~~~~~~~~~~~~~~~~~~~~~~~ +LL - let _ = (1 + 2 + i)--; +LL + let _ = { let tmp = (1 + 2 + i); (1 + 2 + i) -= 1; tmp }; + | error: Rust has no postfix decrement operator --> $DIR/issue-108495-dec.rs:29:15 @@ -51,8 +54,9 @@ LL | let _ = (i-- + 1) + 2; | help: use `-= 1` instead | -LL | let _ = ({ let tmp = i; i -= 1; tmp } + 1) + 2; - | +++++++++++ ~~~~~~~~~~~~~~~ +LL - let _ = (i-- + 1) + 2; +LL + let _ = ({ let tmp = i; i -= 1; tmp } + 1) + 2; + | error: Rust has no postfix decrement operator --> $DIR/issue-108495-dec.rs:35:10 @@ -62,8 +66,9 @@ LL | i--; | help: use `-= 1` instead | -LL | i -= 1; - | ~~~~ +LL - i--; +LL + i -= 1; + | error: aborting due to 7 previous errors diff --git a/tests/ui/parser/issues/issue-110014.stderr b/tests/ui/parser/issues/issue-110014.stderr index 7f1dd592e12..57420bb3496 100644 --- a/tests/ui/parser/issues/issue-110014.stderr +++ b/tests/ui/parser/issues/issue-110014.stderr @@ -6,8 +6,9 @@ LL | fn`2222222222222222222222222222222222222222() {} | help: Unicode character '`' (Grave Accent) looks like ''' (Single Quote), but it is not | -LL | fn'2222222222222222222222222222222222222222() {} - | ~ +LL - fn`2222222222222222222222222222222222222222() {} +LL + fn'2222222222222222222222222222222222222222() {} + | error: expected identifier, found `2222222222222222222222222222222222222222` --> $DIR/issue-110014.rs:1:4 diff --git a/tests/ui/parser/issues/issue-111416.stderr b/tests/ui/parser/issues/issue-111416.stderr index 36f6c5b018f..50ff209afff 100644 --- a/tests/ui/parser/issues/issue-111416.stderr +++ b/tests/ui/parser/issues/issue-111416.stderr @@ -6,8 +6,9 @@ LL | let my = monad_bind(mx, T: Try); | help: if `monad_bind` is a struct, use braces as delimiters | -LL | let my = monad_bind { mx, T: Try }; - | ~ ~ +LL - let my = monad_bind(mx, T: Try); +LL + let my = monad_bind { mx, T: Try }; + | help: if `monad_bind` is a function, use the arguments directly | LL - let my = monad_bind(mx, T: Try); diff --git a/tests/ui/parser/issues/issue-118530-ice.stderr b/tests/ui/parser/issues/issue-118530-ice.stderr index 3519fb8777f..72c0397e9c9 100644 --- a/tests/ui/parser/issues/issue-118530-ice.stderr +++ b/tests/ui/parser/issues/issue-118530-ice.stderr @@ -42,8 +42,9 @@ LL | attr::fn bar() -> String { = help: the `.` operator will dereference the value if needed help: try using `.` instead | -LL | attr::fn bar() . String { - | ~ +LL - attr::fn bar() -> String { +LL + attr::fn bar() . String { + | error: expected one of `(`, `.`, `::`, `;`, `?`, `}`, or an operator, found `{` --> $DIR/issue-118530-ice.rs:5:30 diff --git a/tests/ui/parser/issues/issue-17718-const-mut.stderr b/tests/ui/parser/issues/issue-17718-const-mut.stderr index 54b819c3cfb..16eb773e7f6 100644 --- a/tests/ui/parser/issues/issue-17718-const-mut.stderr +++ b/tests/ui/parser/issues/issue-17718-const-mut.stderr @@ -6,7 +6,8 @@ LL | mut | help: you might want to declare a static instead | -LL | static +LL - const +LL + static | error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-23620-invalid-escapes.stderr b/tests/ui/parser/issues/issue-23620-invalid-escapes.stderr index 4a3743579e7..0cedc178001 100644 --- a/tests/ui/parser/issues/issue-23620-invalid-escapes.stderr +++ b/tests/ui/parser/issues/issue-23620-invalid-escapes.stderr @@ -90,8 +90,9 @@ LL | let _ = "\u8f"; | help: format of unicode escape sequences uses braces | -LL | let _ = "\u{8f}"; - | ~~~~~~ +LL - let _ = "\u8f"; +LL + let _ = "\u{8f}"; + | error: aborting due to 13 previous errors diff --git a/tests/ui/parser/issues/issue-24375.stderr b/tests/ui/parser/issues/issue-24375.stderr index 03cd33f1875..2af57a52035 100644 --- a/tests/ui/parser/issues/issue-24375.stderr +++ b/tests/ui/parser/issues/issue-24375.stderr @@ -7,8 +7,9 @@ LL | tmp[0] => {} = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == tmp[0] => {} - | ~~~ ++++++++++++++++ +LL - tmp[0] => {} +LL + val if val == tmp[0] => {} + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = tmp[0]; diff --git a/tests/ui/parser/issues/issue-30318.stderr b/tests/ui/parser/issues/issue-30318.stderr index 56bc200db1d..cd03bd5fecc 100644 --- a/tests/ui/parser/issues/issue-30318.stderr +++ b/tests/ui/parser/issues/issue-30318.stderr @@ -9,8 +9,9 @@ LL | fn bar() { } | help: to annotate the function, change the doc comment from inner to outer style | -LL | /// Misplaced comment... - | ~ +LL - //! Misplaced comment... +LL + /// Misplaced comment... + | error: an inner attribute is not permitted in this context --> $DIR/issue-30318.rs:9:1 @@ -38,8 +39,9 @@ LL | fn bat() { } | help: to annotate the function, change the doc comment from inner to outer style | -LL | /** Misplaced comment... */ - | ~ +LL - /*! Misplaced comment... */ +LL + /** Misplaced comment... */ + | error[E0753]: expected outer doc comment --> $DIR/issue-30318.rs:19:1 diff --git a/tests/ui/parser/issues/issue-32214.stderr b/tests/ui/parser/issues/issue-32214.stderr index 2ef4305dfd0..5ccd651bb96 100644 --- a/tests/ui/parser/issues/issue-32214.stderr +++ b/tests/ui/parser/issues/issue-32214.stderr @@ -8,8 +8,9 @@ LL | pub fn test<W, I: Trait<Item=(), W> >() {} | help: move the constraint after the generic argument | -LL | pub fn test<W, I: Trait<W, Item = ()> >() {} - | ~~~~~~~~~~~~~~ +LL - pub fn test<W, I: Trait<Item=(), W> >() {} +LL + pub fn test<W, I: Trait<W, Item = ()> >() {} + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-34255-1.stderr b/tests/ui/parser/issues/issue-34255-1.stderr index 1e72f040b03..cd2baaee408 100644 --- a/tests/ui/parser/issues/issue-34255-1.stderr +++ b/tests/ui/parser/issues/issue-34255-1.stderr @@ -6,8 +6,9 @@ LL | Test::Drill(field: 42); | help: if `Test::Drill` is a struct, use braces as delimiters | -LL | Test::Drill { field: 42 }; - | ~ ~ +LL - Test::Drill(field: 42); +LL + Test::Drill { field: 42 }; + | help: if `Test::Drill` is a function, use the arguments directly | LL - Test::Drill(field: 42); diff --git a/tests/ui/parser/issues/issue-44406.stderr b/tests/ui/parser/issues/issue-44406.stderr index 78cde9b6dca..b2367ce15ea 100644 --- a/tests/ui/parser/issues/issue-44406.stderr +++ b/tests/ui/parser/issues/issue-44406.stderr @@ -10,8 +10,9 @@ LL | foo!(true); = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) help: if `bar` is a struct, use braces as delimiters | -LL | bar { baz: $rest } - | ~ ~ +LL - bar(baz: $rest) +LL + bar { baz: $rest } + | help: if `bar` is a function, use the arguments directly | LL - bar(baz: $rest) diff --git a/tests/ui/parser/issues/issue-57684.stderr b/tests/ui/parser/issues/issue-57684.stderr index 39e1c8cd7cc..5fc55efff0a 100644 --- a/tests/ui/parser/issues/issue-57684.stderr +++ b/tests/ui/parser/issues/issue-57684.stderr @@ -6,8 +6,9 @@ LL | let _ = X { f1 = 5 }; | help: replace equals symbol with a colon | -LL | let _ = X { f1: 5 }; - | ~ +LL - let _ = X { f1 = 5 }; +LL + let _ = X { f1: 5 }; + | error: expected `:`, found `=` --> $DIR/issue-57684.rs:32:12 @@ -17,8 +18,9 @@ LL | f1 = 5, | help: replace equals symbol with a colon | -LL | f1: 5, - | ~ +LL - f1 = 5, +LL + f1: 5, + | error: aborting due to 2 previous errors diff --git a/tests/ui/parser/issues/issue-64732.stderr b/tests/ui/parser/issues/issue-64732.stderr index 7ec2df6d3bf..d9f8091d2df 100644 --- a/tests/ui/parser/issues/issue-64732.stderr +++ b/tests/ui/parser/issues/issue-64732.stderr @@ -6,8 +6,9 @@ LL | let _foo = b'hello\0'; | help: if you meant to write a byte string literal, use double quotes | -LL | let _foo = b"hello\0"; - | ~~ ~ +LL - let _foo = b'hello\0'; +LL + let _foo = b"hello\0"; + | error: character literal may only contain one codepoint --> $DIR/issue-64732.rs:6:16 @@ -17,8 +18,9 @@ LL | let _bar = 'hello'; | help: if you meant to write a string literal, use double quotes | -LL | let _bar = "hello"; - | ~ ~ +LL - let _bar = 'hello'; +LL + let _bar = "hello"; + | error: aborting due to 2 previous errors diff --git a/tests/ui/parser/issues/issue-65257-invalid-var-decl-recovery.stderr b/tests/ui/parser/issues/issue-65257-invalid-var-decl-recovery.stderr index 49d091cf391..767f63d6958 100644 --- a/tests/ui/parser/issues/issue-65257-invalid-var-decl-recovery.stderr +++ b/tests/ui/parser/issues/issue-65257-invalid-var-decl-recovery.stderr @@ -6,8 +6,9 @@ LL | auto n = 0; | help: write `let` instead of `auto` to introduce a new variable | -LL | let n = 0; - | ~~~ +LL - auto n = 0; +LL + let n = 0; + | error: invalid variable declaration --> $DIR/issue-65257-invalid-var-decl-recovery.rs:4:5 @@ -17,8 +18,9 @@ LL | auto m; | help: write `let` instead of `auto` to introduce a new variable | -LL | let m; - | ~~~ +LL - auto m; +LL + let m; + | error: invalid variable declaration --> $DIR/issue-65257-invalid-var-decl-recovery.rs:8:5 @@ -28,8 +30,9 @@ LL | var n = 0; | help: write `let` instead of `var` to introduce a new variable | -LL | let n = 0; - | ~~~ +LL - var n = 0; +LL + let n = 0; + | error: invalid variable declaration --> $DIR/issue-65257-invalid-var-decl-recovery.rs:10:5 @@ -39,8 +42,9 @@ LL | var m; | help: write `let` instead of `var` to introduce a new variable | -LL | let m; - | ~~~ +LL - var m; +LL + let m; + | error: invalid variable declaration --> $DIR/issue-65257-invalid-var-decl-recovery.rs:14:5 @@ -50,8 +54,9 @@ LL | mut n = 0; | help: missing keyword | -LL | let mut n = 0; - | ~~~~~~~ +LL - mut n = 0; +LL + let mut n = 0; + | error: invalid variable declaration --> $DIR/issue-65257-invalid-var-decl-recovery.rs:16:5 @@ -61,8 +66,9 @@ LL | mut var; | help: missing keyword | -LL | let mut var; - | ~~~~~~~ +LL - mut var; +LL + let mut var; + | error[E0308]: mismatched types --> $DIR/issue-65257-invalid-var-decl-recovery.rs:20:33 diff --git a/tests/ui/parser/issues/issue-68730.stderr b/tests/ui/parser/issues/issue-68730.stderr index 9bd98287db3..838a6569bdc 100644 --- a/tests/ui/parser/issues/issue-68730.stderr +++ b/tests/ui/parser/issues/issue-68730.stderr @@ -23,8 +23,9 @@ LL | enum␀em␀˂˂ = note: character appears once more help: Unicode character '˂' (Modifier Letter Left Arrowhead) looks like '<' (Less-Than Sign), but it is not | -LL | enum␀em␀<< - | ~~ +LL - enum␀em␀˂˂ +LL + enum␀em␀<< + | error: unknown start of token: \u{2c2} --> $DIR/issue-68730.rs:5:10 @@ -34,8 +35,9 @@ LL | enum␀em␀˂˂ | help: Unicode character '˂' (Modifier Letter Left Arrowhead) looks like '<' (Less-Than Sign), but it is not | -LL | enum␀em␀˂< - | ~ +LL - enum␀em␀˂˂ +LL + enum␀em␀˂< + | error: expected one of `#`, `>`, `const`, identifier, or lifetime, found `<` --> $DIR/issue-68730.rs:5:10 diff --git a/tests/ui/parser/issues/issue-70549-resolve-after-recovered-self-ctor.stderr b/tests/ui/parser/issues/issue-70549-resolve-after-recovered-self-ctor.stderr index c2c0faa21d1..9c632a8332a 100644 --- a/tests/ui/parser/issues/issue-70549-resolve-after-recovered-self-ctor.stderr +++ b/tests/ui/parser/issues/issue-70549-resolve-after-recovered-self-ctor.stderr @@ -12,8 +12,9 @@ LL | fn foo(&mur Self) {} | help: there is a keyword `mut` with a similar name | -LL | fn foo(&mut Self) {} - | ~~~ +LL - fn foo(&mur Self) {} +LL + fn foo(&mut Self) {} + | error: unexpected lifetime `'static` in pattern --> $DIR/issue-70549-resolve-after-recovered-self-ctor.rs:8:13 @@ -41,8 +42,9 @@ LL | fn bar(&'static mur Self) {} | help: there is a keyword `mut` with a similar name | -LL | fn bar(&'static mut Self) {} - | ~~~ +LL - fn bar(&'static mur Self) {} +LL + fn bar(&'static mut Self) {} + | error: expected one of `:`, `@`, or `|`, found keyword `Self` --> $DIR/issue-70549-resolve-after-recovered-self-ctor.rs:14:17 @@ -52,8 +54,9 @@ LL | fn baz(&mur Self @ _) {} | help: there is a keyword `mut` with a similar name | -LL | fn baz(&mut Self @ _) {} - | ~~~ +LL - fn baz(&mur Self @ _) {} +LL + fn baz(&mut Self @ _) {} + | error[E0533]: expected unit struct, found self constructor `Self` --> $DIR/issue-70549-resolve-after-recovered-self-ctor.rs:4:17 diff --git a/tests/ui/parser/issues/issue-73568-lifetime-after-mut.stderr b/tests/ui/parser/issues/issue-73568-lifetime-after-mut.stderr index 2f8728bd78b..6b8f8e4fe4e 100644 --- a/tests/ui/parser/issues/issue-73568-lifetime-after-mut.stderr +++ b/tests/ui/parser/issues/issue-73568-lifetime-after-mut.stderr @@ -6,8 +6,9 @@ LL | fn x<'a>(x: &mut 'a i32){} | help: place the lifetime before `mut` | -LL | fn x<'a>(x: &'a mut i32){} - | ~~~~~~~ +LL - fn x<'a>(x: &mut 'a i32){} +LL + fn x<'a>(x: &'a mut i32){} + | error[E0178]: expected a path on the left-hand side of `+`, not `&mut 'a` --> $DIR/issue-73568-lifetime-after-mut.rs:14:13 @@ -32,8 +33,9 @@ LL | mac!('a); = note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info) help: place the lifetime before `mut` | -LL | fn w<$lt>(w: &$lt mut i32) {} - | ~~~~~~~~ +LL - fn w<$lt>(w: &mut $lt i32) {} +LL + fn w<$lt>(w: &$lt mut i32) {} + | error[E0423]: expected value, found trait `Send` --> $DIR/issue-73568-lifetime-after-mut.rs:17:28 diff --git a/tests/ui/parser/issues/issue-84117.stderr b/tests/ui/parser/issues/issue-84117.stderr index 9f603b84434..e358bc4a2fb 100644 --- a/tests/ui/parser/issues/issue-84117.stderr +++ b/tests/ui/parser/issues/issue-84117.stderr @@ -12,8 +12,9 @@ LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str>, } | + help: use `=` if you meant to assign | -LL | let outer_local:e_outer<&str, { let inner_local =e_inner<&str, } - | ~ +LL - let outer_local:e_outer<&str, { let inner_local:e_inner<&str, } +LL + let outer_local:e_outer<&str, { let inner_local =e_inner<&str, } + | error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,` --> $DIR/issue-84117.rs:2:65 @@ -36,8 +37,9 @@ LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }> | + help: use `=` if you meant to assign | -LL | let outer_local =e_outer<&str, { let inner_local:e_inner<&str, } - | ~ +LL - let outer_local:e_outer<&str, { let inner_local:e_inner<&str, } +LL + let outer_local =e_outer<&str, { let inner_local:e_inner<&str, } + | error: expected one of `>`, a const expression, lifetime, or type, found `}` --> $DIR/issue-84117.rs:2:67 @@ -54,8 +56,9 @@ LL | let outer_local:e_outer<&str, { let inner_local:e_inner<&str>, } | + help: use `=` if you meant to assign | -LL | let outer_local:e_outer<&str, { let inner_local =e_inner<&str, } - | ~ +LL - let outer_local:e_outer<&str, { let inner_local:e_inner<&str, } +LL + let outer_local:e_outer<&str, { let inner_local =e_inner<&str, } + | error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,` --> $DIR/issue-84117.rs:2:65 diff --git a/tests/ui/parser/issues/issue-84148-1.stderr b/tests/ui/parser/issues/issue-84148-1.stderr index 9261067c221..ebe9807dfe3 100644 --- a/tests/ui/parser/issues/issue-84148-1.stderr +++ b/tests/ui/parser/issues/issue-84148-1.stderr @@ -6,8 +6,9 @@ LL | fn f(t:for<>t?) | help: if you meant to express that the type might not contain a value, use the `Option` wrapper type | -LL | fn f(t:Option<for<>t>) - | +++++++ ~ +LL - fn f(t:for<>t?) +LL + fn f(t:Option<for<>t>) + | error: expected one of `->`, `where`, or `{`, found `<eof>` --> $DIR/issue-84148-1.rs:1:15 diff --git a/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr b/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr index b6e24faf5da..fa848368945 100644 --- a/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr +++ b/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr @@ -8,8 +8,9 @@ LL | Foo:Bar => {} | help: maybe write a path separator here | -LL | Foo::Bar => {} - | ~~ +LL - Foo:Bar => {} +LL + Foo::Bar => {} + | error: expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `{`, or `|`, found `:` --> $DIR/issue-87086-colon-path-sep.rs:23:17 @@ -21,8 +22,9 @@ LL | qux::Foo:Bar => {} | help: maybe write a path separator here | -LL | qux::Foo::Bar => {} - | ~~ +LL - qux::Foo:Bar => {} +LL + qux::Foo::Bar => {} + | error: expected one of `@` or `|`, found `:` --> $DIR/issue-87086-colon-path-sep.rs:29:12 @@ -34,8 +36,9 @@ LL | qux:Foo::Baz => {} | help: maybe write a path separator here | -LL | qux::Foo::Baz => {} - | ~~ +LL - qux:Foo::Baz => {} +LL + qux::Foo::Baz => {} + | error: expected one of `@` or `|`, found `:` --> $DIR/issue-87086-colon-path-sep.rs:35:12 @@ -47,8 +50,9 @@ LL | qux: Foo::Baz if true => {} | help: maybe write a path separator here | -LL | qux::Foo::Baz if true => {} - | ~~ +LL - qux: Foo::Baz if true => {} +LL + qux::Foo::Baz if true => {} + | error: expected one of `@` or `|`, found `:` --> $DIR/issue-87086-colon-path-sep.rs:40:15 @@ -60,8 +64,9 @@ LL | if let Foo:Bar = f() { | help: maybe write a path separator here | -LL | if let Foo::Bar = f() { - | ~~ +LL - if let Foo:Bar = f() { +LL + if let Foo::Bar = f() { + | error: expected one of `@` or `|`, found `:` --> $DIR/issue-87086-colon-path-sep.rs:49:16 @@ -73,8 +78,9 @@ LL | ref qux: Foo::Baz => {} | help: maybe write a path separator here | -LL | ref qux::Foo::Baz => {} - | ~~ +LL - ref qux: Foo::Baz => {} +LL + ref qux::Foo::Baz => {} + | error: expected one of `@` or `|`, found `:` --> $DIR/issue-87086-colon-path-sep.rs:58:16 @@ -86,8 +92,9 @@ LL | mut qux: Foo::Baz => {} | help: maybe write a path separator here | -LL | mut qux::Foo::Baz => {} - | ~~ +LL - mut qux: Foo::Baz => {} +LL + mut qux::Foo::Baz => {} + | error: expected one of `@` or `|`, found `:` --> $DIR/issue-87086-colon-path-sep.rs:69:12 @@ -99,8 +106,9 @@ LL | Foo:Bar::Baz => {} | help: maybe write a path separator here | -LL | Foo::Bar::Baz => {} - | ~~ +LL - Foo:Bar::Baz => {} +LL + Foo::Bar::Baz => {} + | error: expected one of `@` or `|`, found `:` --> $DIR/issue-87086-colon-path-sep.rs:75:12 @@ -112,8 +120,9 @@ LL | Foo:Bar => {} | help: maybe write a path separator here | -LL | Foo::Bar => {} - | ~~ +LL - Foo:Bar => {} +LL + Foo::Bar => {} + | warning: irrefutable `if let` pattern --> $DIR/issue-87086-colon-path-sep.rs:40:8 diff --git a/tests/ui/parser/issues/issue-90993.stderr b/tests/ui/parser/issues/issue-90993.stderr index a18e93f1f1a..e9ecc59ec49 100644 --- a/tests/ui/parser/issues/issue-90993.stderr +++ b/tests/ui/parser/issues/issue-90993.stderr @@ -6,12 +6,14 @@ LL | ...=. | help: use `..` for an exclusive range | -LL | ..=. - | ~~ +LL - ...=. +LL + ..=. + | help: or `..=` for an inclusive range | -LL | ..==. - | ~~~ +LL - ...=. +LL + ..==. + | error: unexpected `=` after inclusive range --> $DIR/issue-90993.rs:2:5 @@ -22,8 +24,9 @@ LL | ...=. = note: inclusive ranges end with a single equals sign (`..=`) help: use `..=` instead | -LL | ..=. - | ~~~ +LL - ...=. +LL + ..=. + | error: expected one of `-`, `;`, `}`, or path, found `.` --> $DIR/issue-90993.rs:2:9 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 c98b8fa1f1e..a4e0efcaeb0 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 @@ -6,8 +6,9 @@ LL | pub enum struct Range { | help: replace `enum struct` with | -LL | pub enum Range { - | ~~~~ +LL - pub enum struct Range { +LL + pub enum Range { + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.stderr b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.stderr index 1ccf44a350d..73043de5290 100644 --- a/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.stderr +++ b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.stderr @@ -6,8 +6,9 @@ LL | const let _FOO: i32 = 123; | help: remove `let` | -LL | const _FOO: i32 = 123; - | ~~~~~ +LL - const let _FOO: i32 = 123; +LL + const _FOO: i32 = 123; + | error: `const` and `let` are mutually exclusive --> $DIR/issue-99910-const-let-mutually-exclusive.rs:6:5 @@ -17,8 +18,9 @@ LL | let const _BAR: i32 = 123; | help: remove `let` | -LL | const _BAR: i32 = 123; - | ~~~~~ +LL - let const _BAR: i32 = 123; +LL + const _BAR: i32 = 123; + | error: aborting due to 2 previous errors diff --git a/tests/ui/parser/issues/recover-ge-as-fat-arrow.stderr b/tests/ui/parser/issues/recover-ge-as-fat-arrow.stderr index 2df5cca24f0..997d080f1de 100644 --- a/tests/ui/parser/issues/recover-ge-as-fat-arrow.stderr +++ b/tests/ui/parser/issues/recover-ge-as-fat-arrow.stderr @@ -17,8 +17,9 @@ LL | _ => { let _: u16 = 2u8; } | help: change the type of the numeric literal from `u8` to `u16` | -LL | _ => { let _: u16 = 2u16; } - | ~~~ +LL - _ => { let _: u16 = 2u8; } +LL + _ => { let _: u16 = 2u16; } + | error: aborting due to 2 previous errors diff --git a/tests/ui/parser/item-kw-case-mismatch.stderr b/tests/ui/parser/item-kw-case-mismatch.stderr index 36df72b5cad..df39eb10fdb 100644 --- a/tests/ui/parser/item-kw-case-mismatch.stderr +++ b/tests/ui/parser/item-kw-case-mismatch.stderr @@ -6,8 +6,9 @@ LL | Use std::ptr::read; | help: write it in the correct case (notice the capitalization difference) | -LL | use std::ptr::read; - | ~~~ +LL - Use std::ptr::read; +LL + use std::ptr::read; + | error: keyword `use` is written in the wrong case --> $DIR/item-kw-case-mismatch.rs:8:1 @@ -17,8 +18,9 @@ LL | USE std::ptr::write; | help: write it in the correct case | -LL | use std::ptr::write; - | ~~~ +LL - USE std::ptr::write; +LL + use std::ptr::write; + | error: keyword `fn` is written in the wrong case --> $DIR/item-kw-case-mismatch.rs:10:7 @@ -28,8 +30,9 @@ LL | async Fn _a() {} | help: write it in the correct case (notice the capitalization difference) | -LL | async fn _a() {} - | ~~ +LL - async Fn _a() {} +LL + async fn _a() {} + | error: keyword `fn` is written in the wrong case --> $DIR/item-kw-case-mismatch.rs:13:1 @@ -39,8 +42,9 @@ LL | Fn _b() {} | help: write it in the correct case (notice the capitalization difference) | -LL | fn _b() {} - | ~~ +LL - Fn _b() {} +LL + fn _b() {} + | error: keyword `async` is written in the wrong case --> $DIR/item-kw-case-mismatch.rs:16:1 @@ -50,8 +54,9 @@ LL | aSYNC fN _c() {} | help: write it in the correct case | -LL | async fN _c() {} - | ~~~~~ +LL - aSYNC fN _c() {} +LL + async fN _c() {} + | error: keyword `fn` is written in the wrong case --> $DIR/item-kw-case-mismatch.rs:16:7 @@ -61,8 +66,9 @@ LL | aSYNC fN _c() {} | help: write it in the correct case | -LL | aSYNC fn _c() {} - | ~~ +LL - aSYNC fN _c() {} +LL + aSYNC fn _c() {} + | error: keyword `async` is written in the wrong case --> $DIR/item-kw-case-mismatch.rs:20:1 @@ -72,8 +78,9 @@ LL | Async fn _d() {} | help: write it in the correct case | -LL | async fn _d() {} - | ~~~~~ +LL - Async fn _d() {} +LL + async fn _d() {} + | error: keyword `const` is written in the wrong case --> $DIR/item-kw-case-mismatch.rs:23:1 @@ -83,8 +90,9 @@ LL | CONST UNSAFE FN _e() {} | help: write it in the correct case | -LL | const UNSAFE FN _e() {} - | ~~~~~ +LL - CONST UNSAFE FN _e() {} +LL + const UNSAFE FN _e() {} + | error: keyword `unsafe` is written in the wrong case --> $DIR/item-kw-case-mismatch.rs:23:7 @@ -94,8 +102,9 @@ LL | CONST UNSAFE FN _e() {} | help: write it in the correct case | -LL | CONST unsafe FN _e() {} - | ~~~~~~ +LL - CONST UNSAFE FN _e() {} +LL + CONST unsafe FN _e() {} + | error: keyword `fn` is written in the wrong case --> $DIR/item-kw-case-mismatch.rs:23:14 @@ -105,8 +114,9 @@ LL | CONST UNSAFE FN _e() {} | help: write it in the correct case | -LL | CONST UNSAFE fn _e() {} - | ~~ +LL - CONST UNSAFE FN _e() {} +LL + CONST UNSAFE fn _e() {} + | error: keyword `unsafe` is written in the wrong case --> $DIR/item-kw-case-mismatch.rs:28:1 @@ -116,8 +126,9 @@ LL | unSAFE EXTern "C" fn _f() {} | help: write it in the correct case | -LL | unsafe EXTern "C" fn _f() {} - | ~~~~~~ +LL - unSAFE EXTern "C" fn _f() {} +LL + unsafe EXTern "C" fn _f() {} + | error: keyword `extern` is written in the wrong case --> $DIR/item-kw-case-mismatch.rs:28:8 @@ -127,8 +138,9 @@ LL | unSAFE EXTern "C" fn _f() {} | help: write it in the correct case | -LL | unSAFE extern "C" fn _f() {} - | ~~~~~~ +LL - unSAFE EXTern "C" fn _f() {} +LL + unSAFE extern "C" fn _f() {} + | error: keyword `extern` is written in the wrong case --> $DIR/item-kw-case-mismatch.rs:32:1 @@ -138,8 +150,9 @@ LL | EXTERN "C" FN _g() {} | help: write it in the correct case | -LL | extern "C" FN _g() {} - | ~~~~~~ +LL - EXTERN "C" FN _g() {} +LL + extern "C" FN _g() {} + | error: keyword `fn` is written in the wrong case --> $DIR/item-kw-case-mismatch.rs:32:12 @@ -149,8 +162,9 @@ LL | EXTERN "C" FN _g() {} | help: write it in the correct case | -LL | EXTERN "C" fn _g() {} - | ~~ +LL - EXTERN "C" FN _g() {} +LL + EXTERN "C" fn _g() {} + | error: aborting due to 14 previous errors diff --git a/tests/ui/parser/kw-in-trait-bounds.stderr b/tests/ui/parser/kw-in-trait-bounds.stderr index 3c54e031950..1892d0b6226 100644 --- a/tests/ui/parser/kw-in-trait-bounds.stderr +++ b/tests/ui/parser/kw-in-trait-bounds.stderr @@ -6,8 +6,9 @@ LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn()) | help: use `Fn` to refer to the trait (notice the capitalization difference) | -LL | fn _f<F: Fn(), G>(_: impl fn(), _: &dyn fn()) - | ~~ +LL - fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn()) +LL + fn _f<F: Fn(), G>(_: impl fn(), _: &dyn fn()) + | error: expected identifier, found keyword `fn` --> $DIR/kw-in-trait-bounds.rs:3:27 @@ -17,8 +18,9 @@ LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn()) | help: use `Fn` to refer to the trait (notice the capitalization difference) | -LL | fn _f<F: fn(), G>(_: impl Fn(), _: &dyn fn()) - | ~~ +LL - fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn()) +LL + fn _f<F: fn(), G>(_: impl Fn(), _: &dyn fn()) + | error: expected identifier, found keyword `fn` --> $DIR/kw-in-trait-bounds.rs:3:41 @@ -28,8 +30,9 @@ LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn()) | help: use `Fn` to refer to the trait (notice the capitalization difference) | -LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn Fn()) - | ~~ +LL - fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn()) +LL + fn _f<F: fn(), G>(_: impl fn(), _: &dyn Fn()) + | error: expected identifier, found keyword `fn` --> $DIR/kw-in-trait-bounds.rs:11:4 @@ -39,8 +42,9 @@ LL | G: fn(), | help: use `Fn` to refer to the trait (notice the capitalization difference) | -LL | G: Fn(), - | ~~ +LL - G: fn(), +LL + G: Fn(), + | error: expected identifier, found keyword `struct` --> $DIR/kw-in-trait-bounds.rs:16:10 diff --git a/tests/ui/parser/lifetime-in-pattern.stderr b/tests/ui/parser/lifetime-in-pattern.stderr index 55f9e56a429..ffda28b202b 100644 --- a/tests/ui/parser/lifetime-in-pattern.stderr +++ b/tests/ui/parser/lifetime-in-pattern.stderr @@ -23,8 +23,9 @@ LL | fn test(self: &'a str) { | +++++ help: if this is a parameter name, give it a type | -LL | fn test(str: &TypeName) { - | ~~~~~~~~~~~~~~ +LL - fn test(&'a str) { +LL + fn test(str: &TypeName) { + | help: if this is a type, explicitly ignore the parameter name | LL | fn test(_: &'a str) { diff --git a/tests/ui/parser/lifetime-semicolon.stderr b/tests/ui/parser/lifetime-semicolon.stderr index 4f8e2835e08..f0e42c36c5a 100644 --- a/tests/ui/parser/lifetime-semicolon.stderr +++ b/tests/ui/parser/lifetime-semicolon.stderr @@ -6,8 +6,9 @@ LL | fn foo<'a, 'b>(_x: &mut Foo<'a; 'b>) {} | help: use a comma to separate type parameters | -LL | fn foo<'a, 'b>(_x: &mut Foo<'a, 'b>) {} - | ~ +LL - fn foo<'a, 'b>(_x: &mut Foo<'a; 'b>) {} +LL + fn foo<'a, 'b>(_x: &mut Foo<'a, 'b>) {} + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/macros-no-semicolon-items.stderr b/tests/ui/parser/macros-no-semicolon-items.stderr index 6d2431c4aec..07fa2439df5 100644 --- a/tests/ui/parser/macros-no-semicolon-items.stderr +++ b/tests/ui/parser/macros-no-semicolon-items.stderr @@ -6,8 +6,9 @@ LL | macro_rules! foo() | help: change the delimiters to curly braces | -LL | macro_rules! foo{} - | ~~ +LL - macro_rules! foo() +LL + macro_rules! foo{} + | help: add a semicolon | LL | macro_rules! foo(); diff --git a/tests/ui/parser/match-arm-without-body.stderr b/tests/ui/parser/match-arm-without-body.stderr index 53cf3480dbf..9df8485972f 100644 --- a/tests/ui/parser/match-arm-without-body.stderr +++ b/tests/ui/parser/match-arm-without-body.stderr @@ -18,7 +18,8 @@ LL | (Some(_),) | + + help: ...or a vertical bar to match on multiple alternatives | -LL | Some(_) | +LL - Some(_), +LL + Some(_) | | error: unexpected `,` in pattern diff --git a/tests/ui/parser/match-arm-without-braces.stderr b/tests/ui/parser/match-arm-without-braces.stderr index 4a4a154d860..70cbdcfde0b 100644 --- a/tests/ui/parser/match-arm-without-braces.stderr +++ b/tests/ui/parser/match-arm-without-braces.stderr @@ -8,8 +8,9 @@ LL | Some(Val::Foo) => 3; | help: replace `;` with `,` to end a `match` arm expression | -LL | Some(Val::Foo) => 3, - | ~ +LL - Some(Val::Foo) => 3; +LL + Some(Val::Foo) => 3, + | error: `match` arm body without braces --> $DIR/match-arm-without-braces.rs:31:11 diff --git a/tests/ui/parser/missing-fn-issue-65381-2.stderr b/tests/ui/parser/missing-fn-issue-65381-2.stderr index e13d395d70d..ba2cf497df2 100644 --- a/tests/ui/parser/missing-fn-issue-65381-2.stderr +++ b/tests/ui/parser/missing-fn-issue-65381-2.stderr @@ -6,8 +6,9 @@ LL | main(); | help: if you meant to call a macro, try | -LL | main!(); - | ~~~~~ +LL - main(); +LL + main!(); + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/assoc-type.stderr b/tests/ui/parser/misspelled-keywords/assoc-type.stderr index 677da53e340..e529b477c05 100644 --- a/tests/ui/parser/misspelled-keywords/assoc-type.stderr +++ b/tests/ui/parser/misspelled-keywords/assoc-type.stderr @@ -11,8 +11,9 @@ LL | } | help: write keyword `type` in lowercase | -LL | type Result = u8; - | ~~~~ +LL - Type Result = u8; +LL + type Result = u8; + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/async-move.stderr b/tests/ui/parser/misspelled-keywords/async-move.stderr index 4be4b56e505..a002d54dc91 100644 --- a/tests/ui/parser/misspelled-keywords/async-move.stderr +++ b/tests/ui/parser/misspelled-keywords/async-move.stderr @@ -6,8 +6,9 @@ LL | async Move {} | help: write keyword `move` in lowercase | -LL | async move {} - | ~~~~ +LL - async Move {} +LL + async move {} + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/const-fn.stderr b/tests/ui/parser/misspelled-keywords/const-fn.stderr index 5646b26143c..46a6d8ca779 100644 --- a/tests/ui/parser/misspelled-keywords/const-fn.stderr +++ b/tests/ui/parser/misspelled-keywords/const-fn.stderr @@ -6,8 +6,9 @@ LL | cnst fn code() {} | help: there is a keyword `const` with a similar name | -LL | const fn code() {} - | ~~~~~ +LL - cnst fn code() {} +LL + const fn code() {} + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/const-generics.stderr b/tests/ui/parser/misspelled-keywords/const-generics.stderr index fd59999ab63..2d37656278e 100644 --- a/tests/ui/parser/misspelled-keywords/const-generics.stderr +++ b/tests/ui/parser/misspelled-keywords/const-generics.stderr @@ -6,8 +6,9 @@ LL | fn foo<consta N: usize>(_arr: [i32; N]) {} | help: there is a keyword `const` with a similar name | -LL | fn foo<const N: usize>(_arr: [i32; N]) {} - | ~~~~~ +LL - fn foo<consta N: usize>(_arr: [i32; N]) {} +LL + fn foo<const N: usize>(_arr: [i32; N]) {} + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/const.stderr b/tests/ui/parser/misspelled-keywords/const.stderr index 35e4d731db7..ca76f51f4ed 100644 --- a/tests/ui/parser/misspelled-keywords/const.stderr +++ b/tests/ui/parser/misspelled-keywords/const.stderr @@ -6,8 +6,9 @@ LL | cons A: u8 = 10; | help: there is a keyword `const` with a similar name | -LL | const A: u8 = 10; - | ~~~~~ +LL - cons A: u8 = 10; +LL + const A: u8 = 10; + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/for-loop.stderr b/tests/ui/parser/misspelled-keywords/for-loop.stderr index d2236ab074d..6b94e60452a 100644 --- a/tests/ui/parser/misspelled-keywords/for-loop.stderr +++ b/tests/ui/parser/misspelled-keywords/for-loop.stderr @@ -6,8 +6,9 @@ LL | form i in 1..10 {} | help: there is a keyword `for` with a similar name | -LL | for i in 1..10 {} - | ~~~ +LL - form i in 1..10 {} +LL + for i in 1..10 {} + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/hrdt.stderr b/tests/ui/parser/misspelled-keywords/hrdt.stderr index 5393a730506..e5fc1a50382 100644 --- a/tests/ui/parser/misspelled-keywords/hrdt.stderr +++ b/tests/ui/parser/misspelled-keywords/hrdt.stderr @@ -6,8 +6,9 @@ LL | Where for<'a> F: Fn(&'a (u8, u16)) -> &'a u8, | help: write keyword `where` in lowercase (notice the capitalization difference) | -LL | where for<'a> F: Fn(&'a (u8, u16)) -> &'a u8, - | ~~~~~ +LL - Where for<'a> F: Fn(&'a (u8, u16)) -> &'a u8, +LL + where for<'a> F: Fn(&'a (u8, u16)) -> &'a u8, + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/impl-block.stderr b/tests/ui/parser/misspelled-keywords/impl-block.stderr index d86ae326ce2..8219ed6bfe9 100644 --- a/tests/ui/parser/misspelled-keywords/impl-block.stderr +++ b/tests/ui/parser/misspelled-keywords/impl-block.stderr @@ -6,8 +6,9 @@ LL | ipml Human {} | help: there is a keyword `impl` with a similar name | -LL | impl Human {} - | ~~~~ +LL - ipml Human {} +LL + impl Human {} + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/impl-return.stderr b/tests/ui/parser/misspelled-keywords/impl-return.stderr index 883f5cea73e..ff5391461a9 100644 --- a/tests/ui/parser/misspelled-keywords/impl-return.stderr +++ b/tests/ui/parser/misspelled-keywords/impl-return.stderr @@ -6,8 +6,9 @@ LL | fn code() -> Impl Display {} | help: write keyword `impl` in lowercase (notice the capitalization difference) | -LL | fn code() -> impl Display {} - | ~~~~ +LL - fn code() -> Impl Display {} +LL + fn code() -> impl Display {} + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/impl-trait-for.stderr b/tests/ui/parser/misspelled-keywords/impl-trait-for.stderr index 8dd5a4645f3..fe2356da4bd 100644 --- a/tests/ui/parser/misspelled-keywords/impl-trait-for.stderr +++ b/tests/ui/parser/misspelled-keywords/impl-trait-for.stderr @@ -6,8 +6,9 @@ LL | impl Debug form Human {} | help: there is a keyword `for` with a similar name | -LL | impl Debug for Human {} - | ~~~ +LL - impl Debug form Human {} +LL + impl Debug for Human {} + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/impl-trait.stderr b/tests/ui/parser/misspelled-keywords/impl-trait.stderr index 02a0c808311..4b0c9222a8c 100644 --- a/tests/ui/parser/misspelled-keywords/impl-trait.stderr +++ b/tests/ui/parser/misspelled-keywords/impl-trait.stderr @@ -6,8 +6,9 @@ LL | fn code<T: impll Debug>() -> u8 {} | help: there is a keyword `impl` with a similar name | -LL | fn code<T: impl Debug>() -> u8 {} - | ~~~~ +LL - fn code<T: impll Debug>() -> u8 {} +LL + fn code<T: impl Debug>() -> u8 {} + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/let-else.stderr b/tests/ui/parser/misspelled-keywords/let-else.stderr index 6f41a0d99db..1dde67638ce 100644 --- a/tests/ui/parser/misspelled-keywords/let-else.stderr +++ b/tests/ui/parser/misspelled-keywords/let-else.stderr @@ -6,8 +6,9 @@ LL | let Some(a) = Some(10) elze {} | help: there is a keyword `else` with a similar name | -LL | let Some(a) = Some(10) else {} - | ~~~~ +LL - let Some(a) = Some(10) elze {} +LL + let Some(a) = Some(10) else {} + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/let-mut.stderr b/tests/ui/parser/misspelled-keywords/let-mut.stderr index 766d2a04909..aee457e135b 100644 --- a/tests/ui/parser/misspelled-keywords/let-mut.stderr +++ b/tests/ui/parser/misspelled-keywords/let-mut.stderr @@ -6,8 +6,9 @@ LL | let muta a = 10; | help: there is a keyword `mut` with a similar name | -LL | let mut a = 10; - | ~~~ +LL - let muta a = 10; +LL + let mut a = 10; + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/let.stderr b/tests/ui/parser/misspelled-keywords/let.stderr index c2dcdef541d..9ebc4b5afa6 100644 --- a/tests/ui/parser/misspelled-keywords/let.stderr +++ b/tests/ui/parser/misspelled-keywords/let.stderr @@ -6,8 +6,9 @@ LL | Let a = 10; | help: write keyword `let` in lowercase | -LL | let a = 10; - | ~~~ +LL - Let a = 10; +LL + let a = 10; + | error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `a` --> $DIR/let.rs:7:10 @@ -17,8 +18,9 @@ LL | lett a = 10; | help: there is a keyword `let` with a similar name | -LL | let a = 10; - | ~~~ +LL - lett a = 10; +LL + let a = 10; + | error: aborting due to 2 previous errors diff --git a/tests/ui/parser/misspelled-keywords/match.stderr b/tests/ui/parser/misspelled-keywords/match.stderr index 90780ebd38e..1ec8f7c3b81 100644 --- a/tests/ui/parser/misspelled-keywords/match.stderr +++ b/tests/ui/parser/misspelled-keywords/match.stderr @@ -6,8 +6,9 @@ LL | matche a {} | help: there is a keyword `match` with a similar name | -LL | match a {} - | ~~~~~ +LL - matche a {} +LL + match a {} + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/mod.stderr b/tests/ui/parser/misspelled-keywords/mod.stderr index 6daeb4e5a15..1c1866279ce 100644 --- a/tests/ui/parser/misspelled-keywords/mod.stderr +++ b/tests/ui/parser/misspelled-keywords/mod.stderr @@ -6,8 +6,9 @@ LL | mode parser; | help: there is a keyword `mod` with a similar name | -LL | mod parser; - | ~~~ +LL - mode parser; +LL + mod parser; + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/pub-fn.stderr b/tests/ui/parser/misspelled-keywords/pub-fn.stderr index 82ca7105a49..1123c652c0e 100644 --- a/tests/ui/parser/misspelled-keywords/pub-fn.stderr +++ b/tests/ui/parser/misspelled-keywords/pub-fn.stderr @@ -6,8 +6,9 @@ LL | puB fn code() {} | help: write keyword `pub` in lowercase | -LL | pub fn code() {} - | ~~~ +LL - puB fn code() {} +LL + pub fn code() {} + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/ref.stderr b/tests/ui/parser/misspelled-keywords/ref.stderr index 398d9d6bb99..21b99d6e663 100644 --- a/tests/ui/parser/misspelled-keywords/ref.stderr +++ b/tests/ui/parser/misspelled-keywords/ref.stderr @@ -6,8 +6,9 @@ LL | Some(refe list) => println!("{list:?}"), | help: there is a keyword `ref` with a similar name | -LL | Some(ref list) => println!("{list:?}"), - | ~~~ +LL - Some(refe list) => println!("{list:?}"), +LL + Some(ref list) => println!("{list:?}"), + | error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field --> $DIR/ref.rs:4:14 diff --git a/tests/ui/parser/misspelled-keywords/return.stderr b/tests/ui/parser/misspelled-keywords/return.stderr index efa45f32299..21188ff8cb7 100644 --- a/tests/ui/parser/misspelled-keywords/return.stderr +++ b/tests/ui/parser/misspelled-keywords/return.stderr @@ -6,8 +6,9 @@ LL | returnn a; | help: there is a keyword `return` with a similar name | -LL | return a; - | ~~~~~~ +LL - returnn a; +LL + return a; + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/static-mut.stderr b/tests/ui/parser/misspelled-keywords/static-mut.stderr index 3c25af548a3..10cdfe1adc6 100644 --- a/tests/ui/parser/misspelled-keywords/static-mut.stderr +++ b/tests/ui/parser/misspelled-keywords/static-mut.stderr @@ -6,8 +6,9 @@ LL | static muta a: u8 = 0; | help: there is a keyword `mut` with a similar name | -LL | static mut a: u8 = 0; - | ~~~ +LL - static muta a: u8 = 0; +LL + static mut a: u8 = 0; + | error: missing type for `static` item --> $DIR/static-mut.rs:1:12 diff --git a/tests/ui/parser/misspelled-keywords/static.stderr b/tests/ui/parser/misspelled-keywords/static.stderr index 003aa3929bc..e559f2be109 100644 --- a/tests/ui/parser/misspelled-keywords/static.stderr +++ b/tests/ui/parser/misspelled-keywords/static.stderr @@ -6,8 +6,9 @@ LL | Static a = 0; | help: write keyword `static` in lowercase (notice the capitalization difference) | -LL | static a = 0; - | ~~~~~~ +LL - Static a = 0; +LL + static a = 0; + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/struct.stderr b/tests/ui/parser/misspelled-keywords/struct.stderr index 559182f9c8f..edbec3b9456 100644 --- a/tests/ui/parser/misspelled-keywords/struct.stderr +++ b/tests/ui/parser/misspelled-keywords/struct.stderr @@ -6,8 +6,9 @@ LL | Struct Foor { | help: write keyword `struct` in lowercase (notice the capitalization difference) | -LL | struct Foor { - | ~~~~~~ +LL - Struct Foor { +LL + struct Foor { + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/unsafe-fn.stderr b/tests/ui/parser/misspelled-keywords/unsafe-fn.stderr index b13281b0395..679dbb6af37 100644 --- a/tests/ui/parser/misspelled-keywords/unsafe-fn.stderr +++ b/tests/ui/parser/misspelled-keywords/unsafe-fn.stderr @@ -6,8 +6,9 @@ LL | unsafee fn code() {} | help: there is a keyword `unsafe` with a similar name | -LL | unsafe fn code() {} - | ~~~~~~ +LL - unsafee fn code() {} +LL + unsafe fn code() {} + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/use.stderr b/tests/ui/parser/misspelled-keywords/use.stderr index db6dffdb613..40584c835b7 100644 --- a/tests/ui/parser/misspelled-keywords/use.stderr +++ b/tests/ui/parser/misspelled-keywords/use.stderr @@ -6,8 +6,9 @@ LL | usee a::b; | help: there is a keyword `use` with a similar name | -LL | use a::b; - | ~~~ +LL - usee a::b; +LL + use a::b; + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/where-clause.stderr b/tests/ui/parser/misspelled-keywords/where-clause.stderr index 5143c30ca51..f0835f6e7da 100644 --- a/tests/ui/parser/misspelled-keywords/where-clause.stderr +++ b/tests/ui/parser/misspelled-keywords/where-clause.stderr @@ -8,7 +8,8 @@ LL | wheree | help: there is a keyword `where` with a similar name | -LL | where +LL - wheree +LL + where | error: aborting due to 1 previous error diff --git a/tests/ui/parser/misspelled-keywords/while-loop.stderr b/tests/ui/parser/misspelled-keywords/while-loop.stderr index 7d150443f57..2d1136285c8 100644 --- a/tests/ui/parser/misspelled-keywords/while-loop.stderr +++ b/tests/ui/parser/misspelled-keywords/while-loop.stderr @@ -6,8 +6,9 @@ LL | whilee a < b { | help: there is a keyword `while` with a similar name | -LL | while a < b { - | ~~~~~ +LL - whilee a < b { +LL + while a < b { + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/mut-patterns.stderr b/tests/ui/parser/mut-patterns.stderr index ad19a60af34..43f6a344bf3 100644 --- a/tests/ui/parser/mut-patterns.stderr +++ b/tests/ui/parser/mut-patterns.stderr @@ -33,8 +33,9 @@ LL | let mut (x @ y) = 0; = note: `mut` may be followed by `variable` and `variable @ pattern` help: add `mut` to each binding | -LL | let (mut x @ mut y) = 0; - | ~~~~~~~~~~~~~~~ +LL - let mut (x @ y) = 0; +LL + let (mut x @ mut y) = 0; + | error: `mut` on a binding may not be repeated --> $DIR/mut-patterns.rs:14:13 @@ -69,8 +70,9 @@ LL | let mut Foo { x: x } = Foo { x: 3 }; = note: `mut` may be followed by `variable` and `variable @ pattern` help: add `mut` to each binding | -LL | let Foo { x: mut x } = Foo { x: 3 }; - | ~~~~~~~~~~~~~~~~ +LL - let mut Foo { x: x } = Foo { x: 3 }; +LL + let Foo { x: mut x } = Foo { x: 3 }; + | error: `mut` must be attached to each individual binding --> $DIR/mut-patterns.rs:27:9 @@ -81,8 +83,9 @@ LL | let mut Foo { x } = Foo { x: 3 }; = note: `mut` may be followed by `variable` and `variable @ pattern` help: add `mut` to each binding | -LL | let Foo { mut x } = Foo { x: 3 }; - | ~~~~~~~~~~~~~ +LL - let mut Foo { x } = Foo { x: 3 }; +LL + let Foo { mut x } = Foo { x: 3 }; + | error: `mut` on a binding may not be repeated --> $DIR/mut-patterns.rs:32:13 @@ -151,8 +154,9 @@ LL | let mut W(mut a, W(b, W(ref c, W(d, B { box f })))) = note: `mut` may be followed by `variable` and `variable @ pattern` help: add `mut` to each binding | -LL | let W(mut a, W(mut b, W(ref c, W(mut d, B { box mut f })))) - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +LL - let mut W(mut a, W(b, W(ref c, W(d, B { box f })))) +LL + let W(mut a, W(mut b, W(ref c, W(mut d, B { box mut f })))) + | error: expected identifier, found `x` --> $DIR/mut-patterns.rs:48:21 diff --git a/tests/ui/parser/not-a-pred.stderr b/tests/ui/parser/not-a-pred.stderr index 6f6a332cb81..9fedd208e1a 100644 --- a/tests/ui/parser/not-a-pred.stderr +++ b/tests/ui/parser/not-a-pred.stderr @@ -6,8 +6,9 @@ LL | fn f(a: isize, b: isize) : lt(a, b) { } | help: use `->` instead | -LL | fn f(a: isize, b: isize) -> lt(a, b) { } - | ~~ +LL - fn f(a: isize, b: isize) : lt(a, b) { } +LL + fn f(a: isize, b: isize) -> lt(a, b) { } + | error[E0573]: expected type, found function `lt` --> $DIR/not-a-pred.rs:1:28 diff --git a/tests/ui/parser/public-instead-of-pub-1.stderr b/tests/ui/parser/public-instead-of-pub-1.stderr index 3fbe8d0b164..5695624d3b6 100644 --- a/tests/ui/parser/public-instead-of-pub-1.stderr +++ b/tests/ui/parser/public-instead-of-pub-1.stderr @@ -6,8 +6,9 @@ LL | public enum Test { | help: write `pub` instead of `public` to make the item public | -LL | pub enum Test { - | ~~~ +LL - public enum Test { +LL + pub enum Test { + | 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 b9b924e670a..856bdf18570 100644 --- a/tests/ui/parser/public-instead-of-pub-3.stderr +++ b/tests/ui/parser/public-instead-of-pub-3.stderr @@ -6,8 +6,9 @@ LL | public const X: i32 = 123; | help: write `pub` instead of `public` to make the item public | -LL | pub const X: i32 = 123; - | ~~~ +LL - public const X: i32 = 123; +LL + pub const X: i32 = 123; + | 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 c98f8a9914e..29a208cd484 100644 --- a/tests/ui/parser/public-instead-of-pub.stderr +++ b/tests/ui/parser/public-instead-of-pub.stderr @@ -6,8 +6,9 @@ LL | public struct X; | help: write `pub` instead of `public` to make the item public | -LL | pub struct X; - | ~~~ +LL - public struct X; +LL + pub struct X; + | 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 a573cdf950c..db18cef81b1 100644 --- a/tests/ui/parser/range-inclusive-extra-equals.stderr +++ b/tests/ui/parser/range-inclusive-extra-equals.stderr @@ -7,8 +7,9 @@ LL | if let 1..==3 = 1 {} = note: inclusive ranges end with a single equals sign (`..=`) help: use `..=` instead | -LL | if let 1..=3 = 1 {} - | ~~~ +LL - if let 1..==3 = 1 {} +LL + if let 1..=3 = 1 {} + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/range_inclusive_dotdotdot.stderr b/tests/ui/parser/range_inclusive_dotdotdot.stderr index 2dc2c87eb7b..069133a43a3 100644 --- a/tests/ui/parser/range_inclusive_dotdotdot.stderr +++ b/tests/ui/parser/range_inclusive_dotdotdot.stderr @@ -6,12 +6,14 @@ LL | return ...1; | help: use `..` for an exclusive range | -LL | return ..1; - | ~~ +LL - return ...1; +LL + return ..1; + | help: or `..=` for an inclusive range | -LL | return ..=1; - | ~~~ +LL - return ...1; +LL + return ..=1; + | error: unexpected token: `...` --> $DIR/range_inclusive_dotdotdot.rs:12:13 @@ -21,12 +23,14 @@ LL | let x = ...0; | help: use `..` for an exclusive range | -LL | let x = ..0; - | ~~ +LL - let x = ...0; +LL + let x = ..0; + | help: or `..=` for an inclusive range | -LL | let x = ..=0; - | ~~~ +LL - let x = ...0; +LL + let x = ..=0; + | error: unexpected token: `...` --> $DIR/range_inclusive_dotdotdot.rs:16:14 @@ -36,12 +40,14 @@ LL | let x = 5...5; | help: use `..` for an exclusive range | -LL | let x = 5..5; - | ~~ +LL - let x = 5...5; +LL + let x = 5..5; + | help: or `..=` for an inclusive range | -LL | let x = 5..=5; - | ~~~ +LL - let x = 5...5; +LL + let x = 5..=5; + | error: unexpected token: `...` --> $DIR/range_inclusive_dotdotdot.rs:20:15 @@ -51,12 +57,14 @@ LL | for _ in 0...1 {} | help: use `..` for an exclusive range | -LL | for _ in 0..1 {} - | ~~ +LL - for _ in 0...1 {} +LL + for _ in 0..1 {} + | help: or `..=` for an inclusive range | -LL | for _ in 0..=1 {} - | ~~~ +LL - for _ in 0...1 {} +LL + for _ in 0..=1 {} + | error: aborting due to 4 previous errors diff --git a/tests/ui/parser/recover/recover-assoc-lifetime-constraint.stderr b/tests/ui/parser/recover/recover-assoc-lifetime-constraint.stderr index 606b737e723..d1c803863a2 100644 --- a/tests/ui/parser/recover/recover-assoc-lifetime-constraint.stderr +++ b/tests/ui/parser/recover/recover-assoc-lifetime-constraint.stderr @@ -10,8 +10,9 @@ LL | bar::<Item = 'a>(); = help: if you meant to specify a trait object, write `dyn /* Trait */ + 'a` help: you might have meant to write a bound here | -LL | bar::<Item: 'a>(); - | ~ +LL - bar::<Item = 'a>(); +LL + bar::<Item: 'a>(); + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.stderr b/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.stderr index aee31d08fe0..4e1fcaf4936 100644 --- a/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.stderr +++ b/tests/ui/parser/recover/recover-fn-trait-from-fn-kw.stderr @@ -6,8 +6,9 @@ LL | fn foo(_: impl fn() -> i32) {} | help: use `Fn` to refer to the trait (notice the capitalization difference) | -LL | fn foo(_: impl Fn() -> i32) {} - | ~~ +LL - fn foo(_: impl fn() -> i32) {} +LL + fn foo(_: impl Fn() -> i32) {} + | error: expected identifier, found keyword `fn` --> $DIR/recover-fn-trait-from-fn-kw.rs:4:12 @@ -17,8 +18,9 @@ LL | fn foo2<T: fn(i32)>(_: T) {} | help: use `Fn` to refer to the trait (notice the capitalization difference) | -LL | fn foo2<T: Fn(i32)>(_: T) {} - | ~~ +LL - fn foo2<T: fn(i32)>(_: T) {} +LL + fn foo2<T: Fn(i32)>(_: T) {} + | error[E0308]: mismatched types --> $DIR/recover-fn-trait-from-fn-kw.rs:8:12 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 index beaa346e76c..2bc7952def7 100644 --- a/tests/ui/parser/recover/recover-for-loop-parens-around-head.stderr +++ b/tests/ui/parser/recover/recover-for-loop-parens-around-head.stderr @@ -18,8 +18,9 @@ LL | const _RECOVERY_WITNESS: u32 = 0u8; | help: change the type of the numeric literal from `u8` to `u32` | -LL | const _RECOVERY_WITNESS: u32 = 0u32; - | ~~~ +LL - const _RECOVERY_WITNESS: u32 = 0u8; +LL + const _RECOVERY_WITNESS: u32 = 0u32; + | error: aborting due to 2 previous errors diff --git a/tests/ui/parser/recover/recover-from-bad-variant.stderr b/tests/ui/parser/recover/recover-from-bad-variant.stderr index 0339f869515..9359ede1346 100644 --- a/tests/ui/parser/recover/recover-from-bad-variant.stderr +++ b/tests/ui/parser/recover/recover-from-bad-variant.stderr @@ -6,8 +6,9 @@ LL | let x = Enum::Foo(a: 3, b: 4); | help: if `Enum::Foo` is a struct, use braces as delimiters | -LL | let x = Enum::Foo { a: 3, b: 4 }; - | ~ ~ +LL - let x = Enum::Foo(a: 3, b: 4); +LL + let x = Enum::Foo { a: 3, b: 4 }; + | help: if `Enum::Foo` is a function, use the arguments directly | LL - let x = Enum::Foo(a: 3, b: 4); @@ -22,8 +23,9 @@ LL | Enum::Foo(a, b) => {} | help: the struct variant's fields are being ignored | -LL | Enum::Foo { a: _, b: _ } => {} - | ~~~~~~~~~~~~~~ +LL - Enum::Foo(a, b) => {} +LL + Enum::Foo { a: _, b: _ } => {} + | error[E0769]: tuple variant `Enum::Bar` written as struct variant --> $DIR/recover-from-bad-variant.rs:12:9 @@ -33,8 +35,9 @@ LL | Enum::Bar { a, b } => {} | help: use the tuple variant pattern syntax instead | -LL | Enum::Bar(a, b) => {} - | ~~~~~~ +LL - Enum::Bar { a, b } => {} +LL + Enum::Bar(a, b) => {} + | error: aborting due to 3 previous errors diff --git a/tests/ui/parser/recover/recover-from-homoglyph.stderr b/tests/ui/parser/recover/recover-from-homoglyph.stderr index f11ca9fd584..38ca0259366 100644 --- a/tests/ui/parser/recover/recover-from-homoglyph.stderr +++ b/tests/ui/parser/recover/recover-from-homoglyph.stderr @@ -6,8 +6,9 @@ LL | println!(""); | help: Unicode character ';' (Greek Question Mark) looks like ';' (Semicolon), but it is not | -LL | println!(""); - | ~ +LL - println!(""); +LL + println!(""); + | error[E0308]: mismatched types --> $DIR/recover-from-homoglyph.rs:3:20 diff --git a/tests/ui/parser/recover/recover-pat-exprs.stderr b/tests/ui/parser/recover/recover-pat-exprs.stderr index 281eeced402..dcc1945d569 100644 --- a/tests/ui/parser/recover/recover-pat-exprs.stderr +++ b/tests/ui/parser/recover/recover-pat-exprs.stderr @@ -7,8 +7,9 @@ LL | x.y => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == x.y => (), - | ~~~ +++++++++++++ +LL - x.y => (), +LL + val if val == x.y => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = x.y; @@ -30,8 +31,9 @@ LL | x.0 => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == x.0 => (), - | ~~~ +++++++++++++ +LL - x.0 => (), +LL + val if val == x.0 => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = x.0; @@ -54,8 +56,9 @@ LL | x._0 => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == x._0 => (), - | ~~~ ++++++++++++++ +LL - x._0 => (), +LL + val if val == x._0 => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = x._0; @@ -79,8 +82,9 @@ LL | x.0.1 => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == x.0.1 => (), - | ~~~ +++++++++++++++ +LL - x.0.1 => (), +LL + val if val == x.0.1 => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = x.0.1; @@ -104,8 +108,9 @@ LL | x.4.y.17.__z => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == x.4.y.17.__z => (), - | ~~~ ++++++++++++++++++++++ +LL - x.4.y.17.__z => (), +LL + val if val == x.4.y.17.__z => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = x.4.y.17.__z; @@ -159,8 +164,9 @@ LL | x[0] => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == x[0] => (), - | ~~~ ++++++++++++++ +LL - x[0] => (), +LL + val if val == x[0] => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = x[0]; @@ -181,8 +187,9 @@ LL | x[..] => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == x[..] => (), - | ~~~ +++++++++++++++ +LL - x[..] => (), +LL + val if val == x[..] => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = x[..]; @@ -231,8 +238,9 @@ LL | x.f() => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == x.f() => (), - | ~~~ +++++++++++++++ +LL - x.f() => (), +LL + val if val == x.f() => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = x.f(); @@ -253,8 +261,9 @@ LL | x._f() => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == x._f() => (), - | ~~~ ++++++++++++++++ +LL - x._f() => (), +LL + val if val == x._f() => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = x._f(); @@ -276,8 +285,9 @@ LL | x? => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == x? => (), - | ~~~ ++++++++++++ +LL - x? => (), +LL + val if val == x? => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = x?; @@ -300,8 +310,9 @@ LL | ().f() => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == ().f() => (), - | ~~~ ++++++++++++++++ +LL - ().f() => (), +LL + val if val == ().f() => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = ().f(); @@ -325,8 +336,9 @@ LL | (0, x)?.f() => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == (0, x)?.f() => (), - | ~~~ +++++++++++++++++++++ +LL - (0, x)?.f() => (), +LL + val if val == (0, x)?.f() => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = (0, x)?.f(); @@ -350,8 +362,9 @@ LL | x.f().g() => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == x.f().g() => (), - | ~~~ +++++++++++++++++++ +LL - x.f().g() => (), +LL + val if val == x.f().g() => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = x.f().g(); @@ -375,8 +388,9 @@ LL | 0.f()?.g()?? => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == 0.f()?.g()?? => (), - | ~~~ ++++++++++++++++++++++ +LL - 0.f()?.g()?? => (), +LL + val if val == 0.f()?.g()?? => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = 0.f()?.g()??; @@ -400,8 +414,9 @@ LL | x as usize => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == x as usize => (), - | ~~~ ++++++++++++++++++++ +LL - x as usize => (), +LL + val if val == x as usize => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = x as usize; @@ -422,8 +437,9 @@ LL | 0 as usize => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == 0 as usize => (), - | ~~~ ++++++++++++++++++++ +LL - 0 as usize => (), +LL + val if val == 0 as usize => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = 0 as usize; @@ -445,8 +461,9 @@ LL | x.f().0.4 as f32 => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == x.f().0.4 as f32 => (), - | ~~~ ++++++++++++++++++++++++++ +LL - x.f().0.4 as f32 => (), +LL + val if val == x.f().0.4 as f32 => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = x.f().0.4 as f32; @@ -469,8 +486,9 @@ LL | 1 + 1 => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == 1 + 1 => (), - | ~~~ +++++++++++++++ +LL - 1 + 1 => (), +LL + val if val == 1 + 1 => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = 1 + 1; @@ -491,8 +509,9 @@ LL | (1 + 2) * 3 => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == (1 + 2) * 3 => (), - | ~~~ +++++++++++++++++++++ +LL - (1 + 2) * 3 => (), +LL + val if val == (1 + 2) * 3 => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = (1 + 2) * 3; @@ -514,8 +533,9 @@ LL | x.0 > 2 => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == (x.0 > 2) => (), - | ~~~ +++++++++++++++++++ +LL - x.0 > 2 => (), +LL + val if val == (x.0 > 2) => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = x.0 > 2; @@ -539,8 +559,9 @@ LL | x.0 == 2 => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == (x.0 == 2) => (), - | ~~~ ++++++++++++++++++++ +LL - x.0 == 2 => (), +LL + val if val == (x.0 == 2) => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = x.0 == 2; @@ -564,8 +585,9 @@ LL | (x, y.0 > 2) if x != 0 => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to the match arm guard | -LL | (x, val) if x != 0 && val == (y.0 > 2) => (), - | ~~~ +++++++++++++++++++ +LL - (x, y.0 > 2) if x != 0 => (), +LL + (x, val) if x != 0 && val == (y.0 > 2) => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = y.0 > 2; @@ -586,8 +608,9 @@ LL | (x, y.0 > 2) if x != 0 || x != 1 => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to the match arm guard | -LL | (x, val) if (x != 0 || x != 1) && val == (y.0 > 2) => (), - | ~~~ + +++++++++++++++++++++ +LL - (x, y.0 > 2) if x != 0 || x != 1 => (), +LL + (x, val) if (x != 0 || x != 1) && val == (y.0 > 2) => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = y.0 > 2; @@ -626,8 +649,9 @@ LL | u8::MAX.abs() => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == u8::MAX.abs() => (), - | ~~~ +++++++++++++++++++++++ +LL - u8::MAX.abs() => (), +LL + val if val == u8::MAX.abs() => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = u8::MAX.abs(); @@ -648,8 +672,9 @@ LL | z @ w @ v.u() => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | z @ w @ val if val == v.u() => (), - | ~~~ +++++++++++++++ +LL - z @ w @ v.u() => (), +LL + z @ w @ val if val == v.u() => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = v.u(); @@ -673,8 +698,9 @@ LL | y.ilog(3) => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == y.ilog(3) => (), - | ~~~ +++++++++++++++++++ +LL - y.ilog(3) => (), +LL + val if val == y.ilog(3) => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = y.ilog(3); @@ -698,8 +724,9 @@ LL | n + 1 => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == n + 1 => (), - | ~~~ +++++++++++++++ +LL - n + 1 => (), +LL + val if val == n + 1 => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = n + 1; @@ -723,8 +750,9 @@ LL | ("".f() + 14 * 8) => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | (val) if val == "".f() + 14 * 8 => (), - | ~~~ +++++++++++++++++++++++++ +LL - ("".f() + 14 * 8) => (), +LL + (val) if val == "".f() + 14 * 8 => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = "".f() + 14 * 8; @@ -748,8 +776,9 @@ LL | f?() => (), = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | val if val == f?() => (), - | ~~~ ++++++++++++++ +LL - f?() => (), +LL + val if val == f?() => (), + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = f?(); diff --git a/tests/ui/parser/recover/recover-pat-issues.stderr b/tests/ui/parser/recover/recover-pat-issues.stderr index bdd0b2b260e..0c65b16dd95 100644 --- a/tests/ui/parser/recover/recover-pat-issues.stderr +++ b/tests/ui/parser/recover/recover-pat-issues.stderr @@ -7,8 +7,9 @@ LL | Foo("hi".to_owned()) => true, = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | Foo(val) if val == "hi".to_owned() => true, - | ~~~ +++++++++++++++++++++++++ +LL - Foo("hi".to_owned()) => true, +LL + Foo(val) if val == "hi".to_owned() => true, + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = "hi".to_owned(); @@ -29,8 +30,9 @@ LL | Bar { baz: "hi".to_owned() } => true, = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | Bar { baz } if baz == "hi".to_owned() => true, - | ~~~ +++++++++++++++++++++++++ +LL - Bar { baz: "hi".to_owned() } => true, +LL + Bar { baz } if baz == "hi".to_owned() => true, + | help: consider extracting the expression into a `const` | LL + const BAZ: /* Type */ = "hi".to_owned(); @@ -51,8 +53,9 @@ LL | &["foo".to_string()] => {} = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html> help: consider moving the expression to a match arm guard | -LL | &[val] if val == "foo".to_string() => {} - | ~~~ +++++++++++++++++++++++++++ +LL - &["foo".to_string()] => {} +LL + &[val] if val == "foo".to_string() => {} + | help: consider extracting the expression into a `const` | LL + const VAL: /* Type */ = "foo".to_string(); diff --git a/tests/ui/parser/recover/recover-range-pats.stderr b/tests/ui/parser/recover/recover-range-pats.stderr index 5c134bd4a82..a2f3ba4dd94 100644 --- a/tests/ui/parser/recover/recover-range-pats.stderr +++ b/tests/ui/parser/recover/recover-range-pats.stderr @@ -231,8 +231,9 @@ LL | if let ...3 = 0 {} | help: use `..=` instead | -LL | if let ..=3 = 0 {} - | ~~~ +LL - if let ...3 = 0 {} +LL + if let ..=3 = 0 {} + | error: range-to patterns with `...` are not allowed --> $DIR/recover-range-pats.rs:121:12 @@ -242,8 +243,9 @@ LL | if let ...Y = 0 {} | help: use `..=` instead | -LL | if let ..=Y = 0 {} - | ~~~ +LL - if let ...Y = 0 {} +LL + if let ..=Y = 0 {} + | error: range-to patterns with `...` are not allowed --> $DIR/recover-range-pats.rs:123:12 @@ -253,8 +255,9 @@ LL | if let ...true = 0 {} | help: use `..=` instead | -LL | if let ..=true = 0 {} - | ~~~ +LL - if let ...true = 0 {} +LL + if let ..=true = 0 {} + | error: float literals must have an integer part --> $DIR/recover-range-pats.rs:126:15 @@ -275,8 +278,9 @@ LL | if let ....3 = 0 {} | help: use `..=` instead | -LL | if let ..=.3 = 0 {} - | ~~~ +LL - if let ....3 = 0 {} +LL + if let ..=.3 = 0 {} + | error: range-to patterns with `...` are not allowed --> $DIR/recover-range-pats.rs:152:17 @@ -290,8 +294,9 @@ LL | mac!(0); = note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info) help: use `..=` instead | -LL | let ..=$e; - | ~~~ +LL - let ...$e; +LL + let ..=$e; + | error[E0586]: inclusive range with no end --> $DIR/recover-range-pats.rs:159:19 diff --git a/tests/ui/parser/recover/recover-ref-dyn-mut.stderr b/tests/ui/parser/recover/recover-ref-dyn-mut.stderr index bb0f0b0214c..2f1649f01c9 100644 --- a/tests/ui/parser/recover/recover-ref-dyn-mut.stderr +++ b/tests/ui/parser/recover/recover-ref-dyn-mut.stderr @@ -6,8 +6,9 @@ LL | let r: &dyn mut Trait; | help: place `mut` before `dyn` | -LL | let r: &mut dyn Trait; - | ~~~~~~~~ +LL - let r: &dyn mut Trait; +LL + let r: &mut dyn Trait; + | error[E0405]: cannot find trait `Trait` in this scope --> $DIR/recover-ref-dyn-mut.rs:5:21 diff --git a/tests/ui/parser/recover/turbofish-arg-with-stray-colon.stderr b/tests/ui/parser/recover/turbofish-arg-with-stray-colon.stderr index 551b2e3ff09..15866211954 100644 --- a/tests/ui/parser/recover/turbofish-arg-with-stray-colon.stderr +++ b/tests/ui/parser/recover/turbofish-arg-with-stray-colon.stderr @@ -7,8 +7,9 @@ LL | let x = Tr<A, A:>; = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728> help: maybe write a path separator here | -LL | let x = Tr<A, A::>; - | ~~ +LL - let x = Tr<A, A:>; +LL + let x = Tr<A, A::>; + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/recover/unicode-double-equals-recovery.stderr b/tests/ui/parser/recover/unicode-double-equals-recovery.stderr index 6e10dcce04a..1931fd4ee45 100644 --- a/tests/ui/parser/recover/unicode-double-equals-recovery.stderr +++ b/tests/ui/parser/recover/unicode-double-equals-recovery.stderr @@ -6,8 +6,9 @@ LL | const A: usize ⩵ 2; | help: Unicode character '⩵' (Two Consecutive Equals Signs) looks like '==' (Double Equals Sign), but it is not | -LL | const A: usize == 2; - | ~~ +LL - const A: usize ⩵ 2; +LL + const A: usize == 2; + | error: unexpected `==` --> $DIR/unicode-double-equals-recovery.rs:1:16 @@ -17,8 +18,9 @@ LL | const A: usize ⩵ 2; | help: try using `=` instead | -LL | const A: usize = 2; - | ~ +LL - const A: usize ⩵ 2; +LL + const A: usize = 2; + | error: aborting due to 2 previous errors diff --git a/tests/ui/parser/removed-syntax/removed-syntax-box.stderr b/tests/ui/parser/removed-syntax/removed-syntax-box.stderr index 60c39fd37c4..04e84a10fad 100644 --- a/tests/ui/parser/removed-syntax/removed-syntax-box.stderr +++ b/tests/ui/parser/removed-syntax/removed-syntax-box.stderr @@ -6,8 +6,9 @@ LL | let _ = box (); | help: use `Box::new()` instead | -LL | let _ = Box::new(()); - | ~~~~~~~~~ + +LL - let _ = box (); +LL + let _ = Box::new(()); + | error: `box_syntax` has been removed --> $DIR/removed-syntax-box.rs:10:13 @@ -17,8 +18,9 @@ LL | let _ = box 1; | help: use `Box::new()` instead | -LL | let _ = Box::new(1); - | ~~~~~~~~~ + +LL - let _ = box 1; +LL + let _ = Box::new(1); + | error: `box_syntax` has been removed --> $DIR/removed-syntax-box.rs:11:13 @@ -28,8 +30,9 @@ LL | let _ = box T { a: 12, b: 18 }; | help: use `Box::new()` instead | -LL | let _ = Box::new(T { a: 12, b: 18 }); - | ~~~~~~~~~ + +LL - let _ = box T { a: 12, b: 18 }; +LL + let _ = Box::new(T { a: 12, b: 18 }); + | error: `box_syntax` has been removed --> $DIR/removed-syntax-box.rs:12:13 @@ -39,8 +42,9 @@ LL | let _ = box [5; 30]; | help: use `Box::new()` instead | -LL | let _ = Box::new([5; 30]); - | ~~~~~~~~~ + +LL - let _ = box [5; 30]; +LL + let _ = Box::new([5; 30]); + | error: `box_syntax` has been removed --> $DIR/removed-syntax-box.rs:13:22 @@ -50,8 +54,9 @@ LL | let _: Box<()> = box (); | help: use `Box::new()` instead | -LL | let _: Box<()> = Box::new(()); - | ~~~~~~~~~ + +LL - let _: Box<()> = box (); +LL + let _: Box<()> = Box::new(()); + | error: aborting due to 5 previous errors diff --git a/tests/ui/parser/suggest-assoc-const.stderr b/tests/ui/parser/suggest-assoc-const.stderr index 70ebeded313..8cb304ced37 100644 --- a/tests/ui/parser/suggest-assoc-const.stderr +++ b/tests/ui/parser/suggest-assoc-const.stderr @@ -6,8 +6,9 @@ LL | let _X: i32; | help: consider using `const` instead of `let` for associated const | -LL | const _X: i32; - | ~~~~~ +LL - let _X: i32; +LL + const _X: i32; + | error: aborting due to 1 previous error diff --git a/tests/ui/parser/suggest-remove-compount-assign-let-ice.stderr b/tests/ui/parser/suggest-remove-compount-assign-let-ice.stderr index 59716d69b50..477ec516d66 100644 --- a/tests/ui/parser/suggest-remove-compount-assign-let-ice.stderr +++ b/tests/ui/parser/suggest-remove-compount-assign-let-ice.stderr @@ -6,8 +6,9 @@ LL | let x ➖= 1; | help: Unicode character '➖' (Heavy Minus Sign) looks like '-' (Minus/Hyphen), but it is not | -LL | let x -= 1; - | ~ +LL - let x ➖= 1; +LL + let x -= 1; + | error: can't reassign to an uninitialized variable --> $DIR/suggest-remove-compount-assign-let-ice.rs:13:11 diff --git a/tests/ui/parser/trailing-question-in-type.stderr b/tests/ui/parser/trailing-question-in-type.stderr index a3cd419c0c7..066c38d4c4f 100644 --- a/tests/ui/parser/trailing-question-in-type.stderr +++ b/tests/ui/parser/trailing-question-in-type.stderr @@ -6,8 +6,9 @@ LL | fn foo() -> i32? { | help: if you meant to express that the type might not contain a value, use the `Option` wrapper type | -LL | fn foo() -> Option<i32> { - | +++++++ ~ +LL - fn foo() -> i32? { +LL + fn foo() -> Option<i32> { + | error: invalid `?` in type --> $DIR/trailing-question-in-type.rs:4:15 @@ -17,8 +18,9 @@ LL | let x: i32? = Some(1); | help: if you meant to express that the type might not contain a value, use the `Option` wrapper type | -LL | let x: Option<i32> = Some(1); - | +++++++ ~ +LL - let x: i32? = Some(1); +LL + let x: Option<i32> = Some(1); + | error: aborting due to 2 previous errors diff --git a/tests/ui/parser/type-ascription-in-pattern.stderr b/tests/ui/parser/type-ascription-in-pattern.stderr index 09190754993..d29c76baa7b 100644 --- a/tests/ui/parser/type-ascription-in-pattern.stderr +++ b/tests/ui/parser/type-ascription-in-pattern.stderr @@ -8,8 +8,9 @@ LL | x: i32 => x, | help: maybe write a path separator here | -LL | x::i32 => x, - | ~~ +LL - x: i32 => x, +LL + x::i32 => x, + | error: expected one of `...`, `..=`, `..`, or `|`, found `:` --> $DIR/type-ascription-in-pattern.rs:12:11 @@ -37,8 +38,9 @@ LL | x: i32 => (), | help: maybe write a path separator here | -LL | x::i32 => (), - | ~~ +LL - x: i32 => (), +LL + x::i32 => (), + | error[E0308]: mismatched types --> $DIR/type-ascription-in-pattern.rs:3:19 diff --git a/tests/ui/parser/typod-const-in-const-param-def.stderr b/tests/ui/parser/typod-const-in-const-param-def.stderr index 80c0f1deae6..bf7168a0157 100644 --- a/tests/ui/parser/typod-const-in-const-param-def.stderr +++ b/tests/ui/parser/typod-const-in-const-param-def.stderr @@ -6,8 +6,9 @@ LL | pub fn foo<Const N: u8>() {} | help: use the `const` keyword (notice the capitalization difference) | -LL | pub fn foo<const N: u8>() {} - | ~~~~~ +LL - pub fn foo<Const N: u8>() {} +LL + pub fn foo<const N: u8>() {} + | error: `const` keyword was mistyped as `Const` --> $DIR/typod-const-in-const-param-def.rs:7:12 @@ -17,8 +18,9 @@ LL | pub fn baz<Const N: u8, T>() {} | help: use the `const` keyword (notice the capitalization difference) | -LL | pub fn baz<const N: u8, T>() {} - | ~~~~~ +LL - pub fn baz<Const N: u8, T>() {} +LL + pub fn baz<const N: u8, T>() {} + | error: `const` keyword was mistyped as `Const` --> $DIR/typod-const-in-const-param-def.rs:10:15 @@ -28,8 +30,9 @@ LL | pub fn qux<T, Const N: u8>() {} | help: use the `const` keyword (notice the capitalization difference) | -LL | pub fn qux<T, const N: u8>() {} - | ~~~~~ +LL - pub fn qux<T, Const N: u8>() {} +LL + pub fn qux<T, const N: u8>() {} + | error: `const` keyword was mistyped as `Const` --> $DIR/typod-const-in-const-param-def.rs:13:16 @@ -39,8 +42,9 @@ LL | pub fn quux<T, Const N: u8, U>() {} | help: use the `const` keyword (notice the capitalization difference) | -LL | pub fn quux<T, const N: u8, U>() {} - | ~~~~~ +LL - pub fn quux<T, Const N: u8, U>() {} +LL + pub fn quux<T, const N: u8, U>() {} + | error: aborting due to 4 previous errors diff --git a/tests/ui/parser/unicode-character-literal.stderr b/tests/ui/parser/unicode-character-literal.stderr index a1561e7f04b..8ce2354f0b9 100644 --- a/tests/ui/parser/unicode-character-literal.stderr +++ b/tests/ui/parser/unicode-character-literal.stderr @@ -11,8 +11,9 @@ LL | let _spade = '♠️'; | ^ help: if you meant to write a string literal, use double quotes | -LL | let _spade = "♠️"; - | ~ ~ +LL - let _spade = '♠️'; +LL + let _spade = "♠️"; + | error: character literal may only contain one codepoint --> $DIR/unicode-character-literal.rs:12:14 @@ -27,8 +28,9 @@ LL | let _s = 'ṩ̂̊'; | ^ help: if you meant to write a string literal, use double quotes | -LL | let _s = "ṩ̂̊"; - | ~ ~ +LL - let _s = 'ṩ̂̊'; +LL + let _s = "ṩ̂̊"; + | error: character literal may only contain one codepoint --> $DIR/unicode-character-literal.rs:17:14 @@ -43,8 +45,9 @@ LL | let _a = 'Å'; | ^ help: consider using the normalized form `\u{c5}` of this character | -LL | let _a = 'Å'; - | ~ +LL - let _a = 'Å'; +LL + let _a = 'Å'; + | error: aborting due to 3 previous errors diff --git a/tests/ui/parser/unicode-chars.stderr b/tests/ui/parser/unicode-chars.stderr index 086de5ec099..a18a6ad10dd 100644 --- a/tests/ui/parser/unicode-chars.stderr +++ b/tests/ui/parser/unicode-chars.stderr @@ -6,8 +6,9 @@ LL | let y = 0; | help: Unicode character ';' (Greek Question Mark) looks like ';' (Semicolon), but it is not | -LL | let y = 0; - | ~ +LL - let y = 0; +LL + let y = 0; + | error: unknown start of token: \u{a0} --> $DIR/unicode-chars.rs:5:5 @@ -29,8 +30,9 @@ LL | let _ = 1 ⩵ 2; | help: Unicode character '⩵' (Two Consecutive Equals Signs) looks like '==' (Double Equals Sign), but it is not | -LL | let _ = 1 == 2; - | ~~ +LL - let _ = 1 ⩵ 2; +LL + let _ = 1 == 2; + | error: aborting due to 3 previous errors diff --git a/tests/ui/parser/unicode-control-codepoints.stderr b/tests/ui/parser/unicode-control-codepoints.stderr index 2893194308e..27b95f9ac61 100644 --- a/tests/ui/parser/unicode-control-codepoints.stderr +++ b/tests/ui/parser/unicode-control-codepoints.stderr @@ -22,8 +22,9 @@ LL | println!("{:?}", b"/*� } �if isAdmin� � begin admins only "); | help: if you meant to use the UTF-8 encoding of '\u{202e}', use \xHH escapes | -LL | println!("{:?}", b"/*\xE2\x80\xAE } �if isAdmin� � begin admins only "); - | ~~~~~~~~~~~~ +LL - println!("{:?}", b"/*� } �if isAdmin� � begin admins only "); +LL + println!("{:?}", b"/*\xE2\x80\xAE } �if isAdmin� � begin admins only "); + | error: non-ASCII character in byte string literal --> $DIR/unicode-control-codepoints.rs:18:30 @@ -33,8 +34,9 @@ LL | println!("{:?}", b"/*� } �if isAdmin� � begin admins only "); | help: if you meant to use the UTF-8 encoding of '\u{2066}', use \xHH escapes | -LL | println!("{:?}", b"/*� } \xE2\x81\xA6if isAdmin� � begin admins only "); - | ~~~~~~~~~~~~ +LL - println!("{:?}", b"/*� } �if isAdmin� � begin admins only "); +LL + println!("{:?}", b"/*� } \xE2\x81\xA6if isAdmin� � begin admins only "); + | error: non-ASCII character in byte string literal --> $DIR/unicode-control-codepoints.rs:18:41 @@ -44,8 +46,9 @@ LL | println!("{:?}", b"/*� } �if isAdmin� � begin admins only "); | help: if you meant to use the UTF-8 encoding of '\u{2069}', use \xHH escapes | -LL | println!("{:?}", b"/*� } �if isAdmin\xE2\x81\xA9 � begin admins only "); - | ~~~~~~~~~~~~ +LL - println!("{:?}", b"/*� } �if isAdmin� � begin admins only "); +LL + println!("{:?}", b"/*� } �if isAdmin\xE2\x81\xA9 � begin admins only "); + | error: non-ASCII character in byte string literal --> $DIR/unicode-control-codepoints.rs:18:43 @@ -55,8 +58,9 @@ LL | println!("{:?}", b"/*� } �if isAdmin� � begin admins only "); | help: if you meant to use the UTF-8 encoding of '\u{2066}', use \xHH escapes | -LL | println!("{:?}", b"/*� } �if isAdmin� \xE2\x81\xA6 begin admins only "); - | ~~~~~~~~~~~~ +LL - println!("{:?}", b"/*� } �if isAdmin� � begin admins only "); +LL + println!("{:?}", b"/*� } �if isAdmin� \xE2\x81\xA6 begin admins only "); + | error: non-ASCII character in raw byte string literal --> $DIR/unicode-control-codepoints.rs:23:29 @@ -128,8 +132,9 @@ LL | println!("{:?}", "/*� } �if isAdmin� � begin admins only "); = help: if their presence wasn't intentional, you can remove them help: if you want to keep them but make them visible in your source code, you can escape them | -LL | println!("{:?}", "/*\u{202e} } \u{2066}if isAdmin\u{2069} \u{2066} begin admins only "); - | ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ +LL - println!("{:?}", "/*� } �if isAdmin� � begin admins only "); +LL + println!("{:?}", "/*\u{202e} } \u{2066}if isAdmin\u{2069} \u{2066} begin admins only "); + | error: unicode codepoint changing visible direction of text present in literal --> $DIR/unicode-control-codepoints.rs:16:22 @@ -147,8 +152,9 @@ LL | println!("{:?}", r##"/*� } �if isAdmin� � begin admins only "## = help: if their presence wasn't intentional, you can remove them help: if you want to keep them but make them visible in your source code, you can escape them | -LL | println!("{:?}", r##"/*\u{202e} } \u{2066}if isAdmin\u{2069} \u{2066} begin admins only "##); - | ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ +LL - println!("{:?}", r##"/*� } �if isAdmin� � begin admins only "##); +LL + println!("{:?}", r##"/*\u{202e} } \u{2066}if isAdmin\u{2069} \u{2066} begin admins only "##); + | error: unicode codepoint changing visible direction of text present in literal --> $DIR/unicode-control-codepoints.rs:28:22 @@ -163,8 +169,9 @@ LL | println!("{:?}", '�'); = help: if their presence wasn't intentional, you can remove them help: if you want to keep them but make them visible in your source code, you can escape them | -LL | println!("{:?}", '\u{202e}'); - | ~~~~~~~~ +LL - println!("{:?}", '�'); +LL + println!("{:?}", '\u{202e}'); + | error: unicode codepoint changing visible direction of text present in literal --> $DIR/unicode-control-codepoints.rs:31:13 @@ -179,8 +186,9 @@ LL | let _ = c"�"; = help: if their presence wasn't intentional, you can remove them help: if you want to keep them but make them visible in your source code, you can escape them | -LL | let _ = c"\u{202e}"; - | ~~~~~~~~ +LL - let _ = c"�"; +LL + let _ = c"\u{202e}"; + | error: unicode codepoint changing visible direction of text present in literal --> $DIR/unicode-control-codepoints.rs:33:13 @@ -195,8 +203,9 @@ LL | let _ = cr#"�"#; = help: if their presence wasn't intentional, you can remove them help: if you want to keep them but make them visible in your source code, you can escape them | -LL | let _ = cr#"\u{202e}"#; - | ~~~~~~~~ +LL - let _ = cr#"�"#; +LL + let _ = cr#"\u{202e}"#; + | error: unicode codepoint changing visible direction of text present in format string --> $DIR/unicode-control-codepoints.rs:36:14 @@ -211,8 +220,9 @@ LL | println!("{{�}}"); = help: if their presence wasn't intentional, you can remove them help: if you want to keep them but make them visible in your source code, you can escape them | -LL | println!("{{\u{202e}}}"); - | ~~~~~~~~ +LL - println!("{{�}}"); +LL + println!("{{\u{202e}}}"); + | error: unicode codepoint changing visible direction of text present in doc comment --> $DIR/unicode-control-codepoints.rs:43:1 diff --git a/tests/ui/parser/unicode-quote-chars.stderr b/tests/ui/parser/unicode-quote-chars.stderr index 092abeb53cd..0ffb204d64a 100644 --- a/tests/ui/parser/unicode-quote-chars.stderr +++ b/tests/ui/parser/unicode-quote-chars.stderr @@ -6,8 +6,9 @@ LL | println!(“hello world”); | help: Unicode characters '“' (Left Double Quotation Mark) and '”' (Right Double Quotation Mark) look like '"' (Quotation Mark), but are not | -LL | println!("hello world"); - | ~~~~~~~~~~~~~ +LL - println!(“hello world”); +LL + println!("hello world"); + | error: unknown start of token: \u{201d} --> $DIR/unicode-quote-chars.rs:2:26 @@ -17,8 +18,9 @@ LL | println!(“hello world”); | help: Unicode character '”' (Right Double Quotation Mark) looks like '"' (Quotation Mark), but it is not | -LL | println!(“hello world"); - | ~ +LL - println!(“hello world”); +LL + println!(“hello world"); + | error: expected `,`, found `world` --> $DIR/unicode-quote-chars.rs:2:21 diff --git a/tests/ui/parser/unnecessary-let.stderr b/tests/ui/parser/unnecessary-let.stderr index 0b28123747a..d75d1943f2f 100644 --- a/tests/ui/parser/unnecessary-let.stderr +++ b/tests/ui/parser/unnecessary-let.stderr @@ -18,8 +18,9 @@ LL | for let _x of [1, 2, 3] {} | help: try using `in` here instead | -LL | for let _x in [1, 2, 3] {} - | ~~ +LL - for let _x of [1, 2, 3] {} +LL + for let _x in [1, 2, 3] {} + | error: expected pattern, found `let` --> $DIR/unnecessary-let.rs:9:9 diff --git a/tests/ui/parser/use-colon-as-mod-sep.stderr b/tests/ui/parser/use-colon-as-mod-sep.stderr index 347b271df99..f25a779f31f 100644 --- a/tests/ui/parser/use-colon-as-mod-sep.stderr +++ b/tests/ui/parser/use-colon-as-mod-sep.stderr @@ -7,8 +7,9 @@ LL | use std::process:Command; = note: import paths are delimited using `::` help: use double colon | -LL | use std::process::Command; - | ~~ +LL - use std::process:Command; +LL + use std::process::Command; + | error: expected `::`, found `:` --> $DIR/use-colon-as-mod-sep.rs:5:8 @@ -19,8 +20,9 @@ LL | use std:fs::File; = note: import paths are delimited using `::` help: use double colon | -LL | use std::fs::File; - | ~~ +LL - use std:fs::File; +LL + use std::fs::File; + | error: expected `::`, found `:` --> $DIR/use-colon-as-mod-sep.rs:7:8 @@ -31,8 +33,9 @@ LL | use std:collections:HashMap; = note: import paths are delimited using `::` help: use double colon | -LL | use std::collections:HashMap; - | ~~ +LL - use std:collections:HashMap; +LL + use std::collections:HashMap; + | error: expected `::`, found `:` --> $DIR/use-colon-as-mod-sep.rs:7:20 @@ -43,8 +46,9 @@ LL | use std:collections:HashMap; = note: import paths are delimited using `::` help: use double colon | -LL | use std:collections::HashMap; - | ~~ +LL - use std:collections:HashMap; +LL + use std:collections::HashMap; + | error: aborting due to 4 previous errors diff --git a/tests/ui/parser/utf16-be-without-bom.stderr b/tests/ui/parser/utf16-be-without-bom.stderr index b915c7941b3..0493bcbc77a 100644 --- a/tests/ui/parser/utf16-be-without-bom.stderr +++ b/tests/ui/parser/utf16-be-without-bom.stderr @@ -110,8 +110,9 @@ LL | ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀ | help: consider removing the space to spell keyword `fn` | -LL | ␀fn␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀ - | ~~ +LL - ␀f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀ +LL + ␀fn␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀ + | error: aborting due to 14 previous errors diff --git a/tests/ui/parser/utf16-le-without-bom.stderr b/tests/ui/parser/utf16-le-without-bom.stderr index d937a07bc66..4b195ed0da1 100644 --- a/tests/ui/parser/utf16-le-without-bom.stderr +++ b/tests/ui/parser/utf16-le-without-bom.stderr @@ -110,8 +110,9 @@ LL | f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀ | help: consider removing the space to spell keyword `fn` | -LL | fn␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀ - | ~~ +LL - f␀n␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀ +LL + fn␀ ␀m␀a␀i␀n␀(␀)␀ ␀{␀}␀ + | error: aborting due to 14 previous errors |
