about summary refs log tree commit diff
path: root/tests/ui/parser
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-02-13 03:07:18 +0000
committerJubilee Young <workingjubilee@gmail.com>2025-02-14 00:27:17 -0800
commitf6406dfd4efceb6f713e503aecda587304135ed9 (patch)
treea31b524ba2341d65c7985016a94db014d7459b52 /tests/ui/parser
parentb480a9214a7037813d29bc04d9e9dbe92ce10cf3 (diff)
downloadrust-f6406dfd4efceb6f713e503aecda587304135ed9.tar.gz
rust-f6406dfd4efceb6f713e503aecda587304135ed9.zip
Consider add-prefix replacements too
Diffstat (limited to 'tests/ui/parser')
-rw-r--r--tests/ui/parser/bad-char-literals.stderr5
-rw-r--r--tests/ui/parser/bad-escape-suggest-raw-string.stderr5
-rw-r--r--tests/ui/parser/byte-literals.stderr5
-rw-r--r--tests/ui/parser/issues/issue-65257-invalid-var-decl-recovery.stderr10
-rw-r--r--tests/ui/parser/issues/issue-87086-colon-path-sep.stderr15
-rw-r--r--tests/ui/parser/type-ascription-in-pattern.stderr10
6 files changed, 20 insertions, 30 deletions
diff --git a/tests/ui/parser/bad-char-literals.stderr b/tests/ui/parser/bad-char-literals.stderr
index 3513055cb55..1b047aa4619 100644
--- a/tests/ui/parser/bad-char-literals.stderr
+++ b/tests/ui/parser/bad-char-literals.stderr
@@ -6,9 +6,8 @@ LL |     ''';
    |
 help: escape the character
    |
-LL -     ''';
-LL +     '\'';
-   |
+LL |     '\'';
+   |      ~~
 
 error: character constant must be escaped: `\n`
   --> $DIR/bad-char-literals.rs:10:6
diff --git a/tests/ui/parser/bad-escape-suggest-raw-string.stderr b/tests/ui/parser/bad-escape-suggest-raw-string.stderr
index 5afa1f4a7f8..6dd4ad512a8 100644
--- a/tests/ui/parser/bad-escape-suggest-raw-string.stderr
+++ b/tests/ui/parser/bad-escape-suggest-raw-string.stderr
@@ -7,9 +7,8 @@ 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 = "ab\[c";
-LL +     let bad = r"ab\[c";
-   |
+LL |     let bad = r"ab\[c";
+   |               ~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/byte-literals.stderr b/tests/ui/parser/byte-literals.stderr
index fe3cfb23de8..9e1c2df3e56 100644
--- a/tests/ui/parser/byte-literals.stderr
+++ b/tests/ui/parser/byte-literals.stderr
@@ -39,9 +39,8 @@ 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
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 767f63d6958..7fc2db0fa55 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
@@ -54,9 +54,8 @@ LL |     mut n = 0;
    |
 help: missing keyword
    |
-LL -     mut n = 0;
-LL +     let mut n = 0;
-   |
+LL |     let mut n = 0;
+   |     ~~~~~~~
 
 error: invalid variable declaration
   --> $DIR/issue-65257-invalid-var-decl-recovery.rs:16:5
@@ -66,9 +65,8 @@ LL |     mut var;
    |
 help: missing keyword
    |
-LL -     mut var;
-LL +     let 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-87086-colon-path-sep.stderr b/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr
index f6330e51e0d..b6e24faf5da 100644
--- a/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr
+++ b/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr
@@ -47,9 +47,8 @@ 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
@@ -74,9 +73,8 @@ 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
@@ -88,9 +86,8 @@ 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
diff --git a/tests/ui/parser/type-ascription-in-pattern.stderr b/tests/ui/parser/type-ascription-in-pattern.stderr
index d29c76baa7b..09190754993 100644
--- a/tests/ui/parser/type-ascription-in-pattern.stderr
+++ b/tests/ui/parser/type-ascription-in-pattern.stderr
@@ -8,9 +8,8 @@ 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
@@ -38,9 +37,8 @@ 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