about summary refs log tree commit diff
path: root/tests/ui/parser
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-07-25 04:43:19 +0200
committerGitHub <noreply@github.com>2024-07-25 04:43:19 +0200
commitcce2db06c0206949c5d19d52472fd480ca2d60c0 (patch)
tree3c09a9deca25e52b631e67f034c87f5ad16154d1 /tests/ui/parser
parentcfc5f25b3d7c2f9fa37d0165085cdd4120939716 (diff)
parent9bd7680b2e0f1f5680b04fdb2401bad3e082fa38 (diff)
downloadrust-cce2db06c0206949c5d19d52472fd480ca2d60c0.tar.gz
rust-cce2db06c0206949c5d19d52472fd480ca2d60c0.zip
Rollup merge of #127528 - estebank:ascii-control-chars, r=oli-obk
Replace ASCII control chars with Unicode Control Pictures

Replace ASCII control chars like `CR` with Unicode Control Pictures like `␍`:

```
error: bare CR not allowed in doc-comment
  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:3:32
   |
LL | /// doc comment with bare CR: '␍'
   |                                ^
```

Centralize the checking of unicode char width for the purposes of CLI display in one place. Account for the new replacements. Remove unneeded tracking of "zero-width" unicode chars, as we calculate these in the `SourceMap` as needed now.
Diffstat (limited to 'tests/ui/parser')
-rw-r--r--tests/ui/parser/bad-char-literals.rsbin496 -> 608 bytes
-rw-r--r--tests/ui/parser/bad-char-literals.stderr17
-rw-r--r--tests/ui/parser/brace-in-let-chain.stderr2
-rw-r--r--tests/ui/parser/byte-string-literals.stderr2
-rw-r--r--tests/ui/parser/deli-ident-issue-1.stderr2
-rw-r--r--tests/ui/parser/issues/issue-103451.stderr2
-rw-r--r--tests/ui/parser/issues/issue-104367.stderr2
-rw-r--r--tests/ui/parser/issues/issue-105209.stderr2
-rw-r--r--tests/ui/parser/issues/issue-107705.stderr2
-rw-r--r--tests/ui/parser/issues/issue-2354.stderr2
-rw-r--r--tests/ui/parser/issues/issue-62546.stderr2
-rw-r--r--tests/ui/parser/issues/issue-62554.stderr2
-rw-r--r--tests/ui/parser/issues/issue-62881.stderr2
-rw-r--r--tests/ui/parser/issues/issue-62894.stderr2
-rw-r--r--tests/ui/parser/issues/issue-62973.stderr2
-rw-r--r--tests/ui/parser/issues/issue-63116.stderr2
-rw-r--r--tests/ui/parser/issues/issue-63135.stderr2
-rw-r--r--tests/ui/parser/issues/issue-66473.stderrbin1061 -> 1235 bytes
-rw-r--r--tests/ui/parser/issues/issue-67377-invalid-syntax-in-enum-discriminant.stderr2
-rw-r--r--tests/ui/parser/issues/issue-68629.stderrbin944 -> 990 bytes
-rw-r--r--tests/ui/parser/issues/issue-68730.stderrbin1266 -> 1305 bytes
-rw-r--r--tests/ui/parser/issues/issue-81804.stderr2
-rw-r--r--tests/ui/parser/issues/issue-81827.stderr2
-rw-r--r--tests/ui/parser/issues/issue-84104.stderr2
-rw-r--r--tests/ui/parser/issues/issue-84148-2.stderr2
-rw-r--r--tests/ui/parser/issues/issue-88770.stderr2
-rw-r--r--tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr2
-rw-r--r--tests/ui/parser/mismatched-braces/missing-close-brace-in-struct.stderr2
-rw-r--r--tests/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr2
-rw-r--r--tests/ui/parser/parser-ice-ed2021-await-105210.stderr2
-rw-r--r--tests/ui/parser/parser-recovery-1.stderr2
-rw-r--r--tests/ui/parser/raw/raw-byte-string-literals.stderr2
-rw-r--r--tests/ui/parser/several-carriage-returns-in-doc-comment.stderr10
-rw-r--r--tests/ui/parser/trailing-carriage-return-in-string.stderr2
-rw-r--r--tests/ui/parser/unbalanced-doublequote.stderr2
-rw-r--r--tests/ui/parser/unclosed-braces.stderr2
-rw-r--r--tests/ui/parser/unicode-control-codepoints.stderr98
-rw-r--r--tests/ui/parser/unmatched-delimiter-at-end-of-file.stderr2
-rw-r--r--tests/ui/parser/use-unclosed-brace.stderr2
-rw-r--r--tests/ui/parser/utf16-be-without-bom.stderrbin3641 -> 4110 bytes
-rw-r--r--tests/ui/parser/utf16-le-without-bom.stderrbin3603 -> 4006 bytes
41 files changed, 100 insertions, 89 deletions
diff --git a/tests/ui/parser/bad-char-literals.rs b/tests/ui/parser/bad-char-literals.rs
index 748b4a22253..c3d55d3f7e3 100644
--- a/tests/ui/parser/bad-char-literals.rs
+++ b/tests/ui/parser/bad-char-literals.rs
Binary files differdiff --git a/tests/ui/parser/bad-char-literals.stderr b/tests/ui/parser/bad-char-literals.stderr
index 89253d7d4aa..1fb324a1b7e 100644
--- a/tests/ui/parser/bad-char-literals.stderr
+++ b/tests/ui/parser/bad-char-literals.stderr
@@ -25,7 +25,7 @@ LL |     '\n';
 error: character constant must be escaped: `\r`
   --> $DIR/bad-char-literals.rs:15:6
    |
-LL |     '
';
+LL |     '␍';
    |      ^
    |
 help: escape the character
@@ -33,8 +33,19 @@ help: escape the character
 LL |     '\r';
    |      ++
 
+error: character literal may only contain one codepoint
+  --> $DIR/bad-char-literals.rs:18:5
+   |
+LL |     '-␀-';
+   |     ^^^^^
+   |
+help: if you meant to write a string literal, use double quotes
+   |
+LL |     "-␀-";
+   |     ~   ~
+
 error: character constant must be escaped: `\t`
-  --> $DIR/bad-char-literals.rs:18:6
+  --> $DIR/bad-char-literals.rs:21:6
    |
 LL |     '    ';
    |      ^^^^
@@ -44,5 +55,5 @@ help: escape the character
 LL |     '\t';
    |      ++
 
-error: aborting due to 4 previous errors
+error: aborting due to 5 previous errors
 
diff --git a/tests/ui/parser/brace-in-let-chain.stderr b/tests/ui/parser/brace-in-let-chain.stderr
index 7182d86d001..d76cb25ad8b 100644
--- a/tests/ui/parser/brace-in-let-chain.stderr
+++ b/tests/ui/parser/brace-in-let-chain.stderr
@@ -31,7 +31,7 @@ LL |             && let () = ()
 LL |     }
    |     - ...as it matches this but it has different indentation
 LL | }
-   |                                                      ^
+   |                                                     ^
 
 error: found a `{` in the middle of a let-chain
   --> $DIR/brace-in-let-chain.rs:14:24
diff --git a/tests/ui/parser/byte-string-literals.stderr b/tests/ui/parser/byte-string-literals.stderr
index 655b6998e85..24e0eaac8fa 100644
--- a/tests/ui/parser/byte-string-literals.stderr
+++ b/tests/ui/parser/byte-string-literals.stderr
@@ -43,7 +43,7 @@ error[E0766]: unterminated double quote byte string
 LL |       b"a
    |  ______^
 LL | | }
-   | |__^
+   | |_^
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/parser/deli-ident-issue-1.stderr b/tests/ui/parser/deli-ident-issue-1.stderr
index 78f5d7b63b9..d17913eb7ea 100644
--- a/tests/ui/parser/deli-ident-issue-1.stderr
+++ b/tests/ui/parser/deli-ident-issue-1.stderr
@@ -11,7 +11,7 @@ LL |     }
    |     - ...as it matches this but it has different indentation
 ...
 LL | fn main() { }
-   |                                                                  ^
+   |                                                                 ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/issues/issue-103451.stderr b/tests/ui/parser/issues/issue-103451.stderr
index 7ad816e451e..f078e556e2b 100644
--- a/tests/ui/parser/issues/issue-103451.stderr
+++ b/tests/ui/parser/issues/issue-103451.stderr
@@ -4,7 +4,7 @@ error: this file contains an unclosed delimiter
 LL | struct S {
    |          - unclosed delimiter
 LL |     x: [u8; R
-   |        -      ^
+   |        -     ^
    |        |
    |        unclosed delimiter
 
diff --git a/tests/ui/parser/issues/issue-104367.stderr b/tests/ui/parser/issues/issue-104367.stderr
index e6e76535761..c067d12e2d9 100644
--- a/tests/ui/parser/issues/issue-104367.stderr
+++ b/tests/ui/parser/issues/issue-104367.stderr
@@ -20,7 +20,7 @@ LL |         #![cfg] {
 LL |             #![w,)
    |                  - missing open `(` for this delimiter
 LL |
-   |                                                                       ^
+   |                                                                      ^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/parser/issues/issue-105209.stderr b/tests/ui/parser/issues/issue-105209.stderr
index c75eafa1833..72017e4327d 100644
--- a/tests/ui/parser/issues/issue-105209.stderr
+++ b/tests/ui/parser/issues/issue-105209.stderr
@@ -16,7 +16,7 @@ LL | #![c={#![c[)x
    |   |  unclosed delimiter
    |   unclosed delimiter
 LL |
-   |                                                                    ^
+   |                                                                   ^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/parser/issues/issue-107705.stderr b/tests/ui/parser/issues/issue-107705.stderr
index 2d0c3e0e675..10a47b79931 100644
--- a/tests/ui/parser/issues/issue-107705.stderr
+++ b/tests/ui/parser/issues/issue-107705.stderr
@@ -2,7 +2,7 @@ error: this file contains an unclosed delimiter
   --> $DIR/issue-107705.rs:3:67
    |
 LL | fn f() {a(b:&,
-   |        - - unclosed delimiter                                     ^
+   |        - - unclosed delimiter                                    ^
    |        |
    |        unclosed delimiter
 
diff --git a/tests/ui/parser/issues/issue-2354.stderr b/tests/ui/parser/issues/issue-2354.stderr
index fd649a575c6..3e63473b6f4 100644
--- a/tests/ui/parser/issues/issue-2354.stderr
+++ b/tests/ui/parser/issues/issue-2354.stderr
@@ -10,7 +10,7 @@ LL | }
    | - ...as it matches this but it has different indentation
 ...
 LL |
-   |                                                    ^
+   |                                                   ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/issues/issue-62546.stderr b/tests/ui/parser/issues/issue-62546.stderr
index 6889cb3b8e9..6435cb2b719 100644
--- a/tests/ui/parser/issues/issue-62546.stderr
+++ b/tests/ui/parser/issues/issue-62546.stderr
@@ -2,7 +2,7 @@ error: this file contains an unclosed delimiter
   --> $DIR/issue-62546.rs:1:60
    |
 LL | pub t(#
-   |      - unclosed delimiter                                  ^
+   |      - unclosed delimiter                                 ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/issues/issue-62554.stderr b/tests/ui/parser/issues/issue-62554.stderr
index 37314dd39c7..d4aaef16181 100644
--- a/tests/ui/parser/issues/issue-62554.stderr
+++ b/tests/ui/parser/issues/issue-62554.stderr
@@ -2,7 +2,7 @@ error: this file contains an unclosed delimiter
   --> $DIR/issue-62554.rs:5:89
    |
 LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 {
-   |               -                       -         -                  -                  - ^
+   |               -                       -         -                  -                  -^
    |               |                       |         |                  |                  |
    |               |                       |         |                  |                  unclosed delimiter
    |               |                       |         |                  unclosed delimiter
diff --git a/tests/ui/parser/issues/issue-62881.stderr b/tests/ui/parser/issues/issue-62881.stderr
index 2165a81a048..d8ae2cf0905 100644
--- a/tests/ui/parser/issues/issue-62881.stderr
+++ b/tests/ui/parser/issues/issue-62881.stderr
@@ -2,7 +2,7 @@ error: this file contains an unclosed delimiter
   --> $DIR/issue-62881.rs:3:96
    |
 LL | fn f() -> isize { fn f() -> isize {} pub f<
-   |                 - unclosed delimiter                                                           ^
+   |                 - unclosed delimiter                                                          ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/issues/issue-62894.stderr b/tests/ui/parser/issues/issue-62894.stderr
index 870633fc96f..230319fc31e 100644
--- a/tests/ui/parser/issues/issue-62894.stderr
+++ b/tests/ui/parser/issues/issue-62894.stderr
@@ -8,7 +8,7 @@ LL | fn f() { assert_eq!(f(), (), assert_eq!(assert_eq!
    |        unclosed delimiter
 LL |
 LL | fn main() {}
-   |              ^
+   |             ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/issues/issue-62973.stderr b/tests/ui/parser/issues/issue-62973.stderr
index 14411a8cb78..493183988e1 100644
--- a/tests/ui/parser/issues/issue-62973.stderr
+++ b/tests/ui/parser/issues/issue-62973.stderr
@@ -25,7 +25,7 @@ LL | fn p() { match s { v, E { [) {) }
    |        unclosed delimiter
 LL |
 LL |
-   |  ^
+   | ^
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/parser/issues/issue-63116.stderr b/tests/ui/parser/issues/issue-63116.stderr
index 27c94f337bd..e0f7dd176ce 100644
--- a/tests/ui/parser/issues/issue-63116.stderr
+++ b/tests/ui/parser/issues/issue-63116.stderr
@@ -10,7 +10,7 @@ error: this file contains an unclosed delimiter
   --> $DIR/issue-63116.rs:3:18
    |
 LL | impl W <s(f;Y(;]
-   |          -     - ^
+   |          -     -^
    |          |     |
    |          |     missing open `[` for this delimiter
    |          unclosed delimiter
diff --git a/tests/ui/parser/issues/issue-63135.stderr b/tests/ui/parser/issues/issue-63135.stderr
index 9204f561e96..d6275901a53 100644
--- a/tests/ui/parser/issues/issue-63135.stderr
+++ b/tests/ui/parser/issues/issue-63135.stderr
@@ -2,7 +2,7 @@ error: this file contains an unclosed delimiter
   --> $DIR/issue-63135.rs:3:16
    |
 LL | fn i(n{...,f #
-   |     - -        ^
+   |     - -       ^
    |     | |
    |     | unclosed delimiter
    |     unclosed delimiter
diff --git a/tests/ui/parser/issues/issue-66473.stderr b/tests/ui/parser/issues/issue-66473.stderr
index 0e8b0a5da22..ba38c4fa1b7 100644
--- a/tests/ui/parser/issues/issue-66473.stderr
+++ b/tests/ui/parser/issues/issue-66473.stderr
Binary files differdiff --git a/tests/ui/parser/issues/issue-67377-invalid-syntax-in-enum-discriminant.stderr b/tests/ui/parser/issues/issue-67377-invalid-syntax-in-enum-discriminant.stderr
index 9f631edf680..b82b0f3255b 100644
--- a/tests/ui/parser/issues/issue-67377-invalid-syntax-in-enum-discriminant.stderr
+++ b/tests/ui/parser/issues/issue-67377-invalid-syntax-in-enum-discriminant.stderr
@@ -41,7 +41,7 @@ LL |         V = [Vec::new; { [0].len() ].len() as isize,
    |                                    - missing open `[` for this delimiter
 ...
 LL | fn main() {}
-   |                                                                 ^
+   |                                                                ^
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/parser/issues/issue-68629.stderr b/tests/ui/parser/issues/issue-68629.stderr
index 2562baa1c49..f003f378179 100644
--- a/tests/ui/parser/issues/issue-68629.stderr
+++ b/tests/ui/parser/issues/issue-68629.stderr
Binary files differdiff --git a/tests/ui/parser/issues/issue-68730.stderr b/tests/ui/parser/issues/issue-68730.stderr
index 5bca5bbebea..9bd98287db3 100644
--- a/tests/ui/parser/issues/issue-68730.stderr
+++ b/tests/ui/parser/issues/issue-68730.stderr
Binary files differdiff --git a/tests/ui/parser/issues/issue-81804.stderr b/tests/ui/parser/issues/issue-81804.stderr
index de3b33ecd95..6caaaa792b1 100644
--- a/tests/ui/parser/issues/issue-81804.stderr
+++ b/tests/ui/parser/issues/issue-81804.stderr
@@ -10,7 +10,7 @@ error: this file contains an unclosed delimiter
   --> $DIR/issue-81804.rs:6:11
    |
 LL | fn p([=(}
-   |     --    ^
+   |     --   ^
    |     ||
    |     |unclosed delimiter
    |     unclosed delimiter
diff --git a/tests/ui/parser/issues/issue-81827.stderr b/tests/ui/parser/issues/issue-81827.stderr
index 63d135f73e6..d12c74b4a34 100644
--- a/tests/ui/parser/issues/issue-81827.stderr
+++ b/tests/ui/parser/issues/issue-81827.stderr
@@ -11,7 +11,7 @@ error: this file contains an unclosed delimiter
   --> $DIR/issue-81827.rs:10:27
    |
 LL | fn r()->i{0|{#[cfg(r(0{]0
-   |          -  -          -  ^
+   |          -  -          - ^
    |          |  |          |
    |          |  |          missing open `[` for this delimiter
    |          |  unclosed delimiter
diff --git a/tests/ui/parser/issues/issue-84104.stderr b/tests/ui/parser/issues/issue-84104.stderr
index e866d392267..b9b14c081a9 100644
--- a/tests/ui/parser/issues/issue-84104.stderr
+++ b/tests/ui/parser/issues/issue-84104.stderr
@@ -2,7 +2,7 @@ error: this file contains an unclosed delimiter
   --> $DIR/issue-84104.rs:2:13
    |
 LL | #[i=i::<ښܖ<
-   |  -          ^
+   |  -         ^
    |  |
    |  unclosed delimiter
 
diff --git a/tests/ui/parser/issues/issue-84148-2.stderr b/tests/ui/parser/issues/issue-84148-2.stderr
index d9b6b336a2c..b30f3d9114c 100644
--- a/tests/ui/parser/issues/issue-84148-2.stderr
+++ b/tests/ui/parser/issues/issue-84148-2.stderr
@@ -2,7 +2,7 @@ error: this file contains an unclosed delimiter
   --> $DIR/issue-84148-2.rs:2:16
    |
 LL | fn f(t:for<>t?
-   |     -          ^
+   |     -         ^
    |     |
    |     unclosed delimiter
 
diff --git a/tests/ui/parser/issues/issue-88770.stderr b/tests/ui/parser/issues/issue-88770.stderr
index 60ef025fa8b..5b54072d009 100644
--- a/tests/ui/parser/issues/issue-88770.stderr
+++ b/tests/ui/parser/issues/issue-88770.stderr
@@ -8,7 +8,7 @@ LL | fn m(){print!("",(c for&g
    |       unclosed delimiter
 ...
 LL | e
-   |   ^
+   |  ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr b/tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr
index 97aac661d46..39144246be2 100644
--- a/tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr
+++ b/tests/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr
@@ -5,7 +5,7 @@ LL | impl T for () {
    |               - unclosed delimiter
 ...
 LL |
-   |                                                    ^
+   |                                                   ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/mismatched-braces/missing-close-brace-in-struct.stderr b/tests/ui/parser/mismatched-braces/missing-close-brace-in-struct.stderr
index f70dac443e5..603aee02ad6 100644
--- a/tests/ui/parser/mismatched-braces/missing-close-brace-in-struct.stderr
+++ b/tests/ui/parser/mismatched-braces/missing-close-brace-in-struct.stderr
@@ -5,7 +5,7 @@ LL | pub(crate) struct Bar<T> {
    |                          - unclosed delimiter
 ...
 LL | fn main() {}
-   |                                                                 ^
+   |                                                                ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr b/tests/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr
index a565ad49b22..a2fb698c80f 100644
--- a/tests/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr
+++ b/tests/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr
@@ -5,7 +5,7 @@ LL | trait T {
    |         - unclosed delimiter
 ...
 LL | fn main() {}
-   |                                                                 ^
+   |                                                                ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/parser-ice-ed2021-await-105210.stderr b/tests/ui/parser/parser-ice-ed2021-await-105210.stderr
index fc54476c220..29abab2608e 100644
--- a/tests/ui/parser/parser-ice-ed2021-await-105210.stderr
+++ b/tests/ui/parser/parser-ice-ed2021-await-105210.stderr
@@ -28,7 +28,7 @@ LL |  (( h (const {( default ( await ( await (    (move {await((((}}
    |  unclosed delimiter
 ...
 LL |
-   |                                                    ^
+   |                                                   ^
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/parser/parser-recovery-1.stderr b/tests/ui/parser/parser-recovery-1.stderr
index 8162db3d8e5..4ed40d75326 100644
--- a/tests/ui/parser/parser-recovery-1.stderr
+++ b/tests/ui/parser/parser-recovery-1.stderr
@@ -10,7 +10,7 @@ LL | }
    | - ...as it matches this but it has different indentation
 ...
 LL | }
-   |                                                      ^
+   |                                                     ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/raw/raw-byte-string-literals.stderr b/tests/ui/parser/raw/raw-byte-string-literals.stderr
index a2f27d1ed70..a20ce845c32 100644
--- a/tests/ui/parser/raw/raw-byte-string-literals.stderr
+++ b/tests/ui/parser/raw/raw-byte-string-literals.stderr
@@ -1,7 +1,7 @@
 error: bare CR not allowed in raw string
   --> $DIR/raw-byte-string-literals.rs:4:9
    |
-LL |     br"a
";
+LL |     br"a␍";
    |         ^
 
 error: non-ASCII character in raw byte string literal
diff --git a/tests/ui/parser/several-carriage-returns-in-doc-comment.stderr b/tests/ui/parser/several-carriage-returns-in-doc-comment.stderr
index 07066fc22e6..e235a158384 100644
--- a/tests/ui/parser/several-carriage-returns-in-doc-comment.stderr
+++ b/tests/ui/parser/several-carriage-returns-in-doc-comment.stderr
@@ -1,20 +1,20 @@
 error: bare CR not allowed in doc-comment
   --> $DIR/several-carriage-returns-in-doc-comment.rs:6:12
    |
-LL | /// This do
c comment contains 
three isolated `\r`
 symbols
+LL | /// This do␍c comment contains ␍three isolated `\r`␍ symbols
    |            ^
 
 error: bare CR not allowed in doc-comment
   --> $DIR/several-carriage-returns-in-doc-comment.rs:6:32
    |
-LL | /// This do
c comment contains 
three isolated `\r`
 symbols
-   |                               ^
+LL | /// This do␍c comment contains ␍three isolated `\r`␍ symbols
+   |                                ^
 
 error: bare CR not allowed in doc-comment
   --> $DIR/several-carriage-returns-in-doc-comment.rs:6:52
    |
-LL | /// This do
c comment contains 
three isolated `\r`
 symbols
-   |                                                  ^
+LL | /// This do␍c comment contains ␍three isolated `\r`␍ symbols
+   |                                                    ^
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/parser/trailing-carriage-return-in-string.stderr b/tests/ui/parser/trailing-carriage-return-in-string.stderr
index fa2677921b3..c5949432af8 100644
--- a/tests/ui/parser/trailing-carriage-return-in-string.stderr
+++ b/tests/ui/parser/trailing-carriage-return-in-string.stderr
@@ -1,7 +1,7 @@
 error: unknown character escape: `\r`
   --> $DIR/trailing-carriage-return-in-string.rs:10:25
    |
-LL |     let bad = "This is \
 a test";
+LL |     let bad = "This is \␍ a test";
    |                         ^ unknown character escape
    |
    = help: this is an isolated carriage return; consider checking your editor and version control settings
diff --git a/tests/ui/parser/unbalanced-doublequote.stderr b/tests/ui/parser/unbalanced-doublequote.stderr
index d40b982da7c..9fdad87a86c 100644
--- a/tests/ui/parser/unbalanced-doublequote.stderr
+++ b/tests/ui/parser/unbalanced-doublequote.stderr
@@ -3,7 +3,7 @@ error[E0765]: unterminated double quote string
    |
 LL | /     "
 LL | | }
-   | |__^
+   | |_^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/unclosed-braces.stderr b/tests/ui/parser/unclosed-braces.stderr
index acd92ac7925..74ac66af528 100644
--- a/tests/ui/parser/unclosed-braces.stderr
+++ b/tests/ui/parser/unclosed-braces.stderr
@@ -11,7 +11,7 @@ LL |     }
    |     - ...as it matches this but it has different indentation
 ...
 LL |
-   |                                                    ^
+   |                                                   ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/unicode-control-codepoints.stderr b/tests/ui/parser/unicode-control-codepoints.stderr
index fc071a94191..28de4ae72ab 100644
--- a/tests/ui/parser/unicode-control-codepoints.stderr
+++ b/tests/ui/parser/unicode-control-codepoints.stderr
@@ -17,78 +17,78 @@ LL |     println!("{:?}", b"us\u{202B}e\u{202A}r");
 error: non-ASCII character in byte string literal
   --> $DIR/unicode-control-codepoints.rs:16:26
    |
-LL |     println!("{:?}", b"/* } if isAdmin  begin admins only ");
+LL |     println!("{:?}", b"/*� } �if isAdmin� � begin admins only ");
    |                          ^ must be ASCII but is '\u{202e}'
    |
 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"/*\xE2\x80\xAE } �if isAdmin� � begin admins only ");
    |                          ~~~~~~~~~~~~
 
 error: non-ASCII character in byte string literal
   --> $DIR/unicode-control-codepoints.rs:16:30
    |
-LL |     println!("{:?}", b"/* } if isAdmin  begin admins only ");
-   |                             ^ must be ASCII but is '\u{2066}'
+LL |     println!("{:?}", b"/*� } �if isAdmin� � begin admins only ");
+   |                              ^ must be ASCII but is '\u{2066}'
    |
 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"/*� } \xE2\x81\xA6if isAdmin� � begin admins only ");
+   |                              ~~~~~~~~~~~~
 
 error: non-ASCII character in byte string literal
   --> $DIR/unicode-control-codepoints.rs:16:41
    |
-LL |     println!("{:?}", b"/* } if isAdmin  begin admins only ");
-   |                                       ^ must be ASCII but is '\u{2069}'
+LL |     println!("{:?}", b"/*� } �if isAdmin� � begin admins only ");
+   |                                         ^ must be ASCII but is '\u{2069}'
    |
 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\xE2\x81\xA9 � begin admins only ");
+   |                                         ~~~~~~~~~~~~
 
 error: non-ASCII character in byte string literal
   --> $DIR/unicode-control-codepoints.rs:16:43
    |
-LL |     println!("{:?}", b"/* } if isAdmin  begin admins only ");
-   |                                        ^ must be ASCII but is '\u{2066}'
+LL |     println!("{:?}", b"/*� } �if isAdmin� � begin admins only ");
+   |                                           ^ must be ASCII but is '\u{2066}'
    |
 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� \xE2\x81\xA6 begin admins only ");
+   |                                           ~~~~~~~~~~~~
 
 error: non-ASCII character in raw byte string literal
   --> $DIR/unicode-control-codepoints.rs:21:29
    |
-LL |     println!("{:?}", br##"/* } if isAdmin  begin admins only "##);
+LL |     println!("{:?}", br##"/*� } �if isAdmin� � begin admins only "##);
    |                             ^ must be ASCII but is '\u{202e}'
 
 error: non-ASCII character in raw byte string literal
   --> $DIR/unicode-control-codepoints.rs:21:33
    |
-LL |     println!("{:?}", br##"/* } if isAdmin  begin admins only "##);
-   |                                ^ must be ASCII but is '\u{2066}'
+LL |     println!("{:?}", br##"/*� } �if isAdmin� � begin admins only "##);
+   |                                 ^ must be ASCII but is '\u{2066}'
 
 error: non-ASCII character in raw byte string literal
   --> $DIR/unicode-control-codepoints.rs:21:44
    |
-LL |     println!("{:?}", br##"/* } if isAdmin  begin admins only "##);
-   |                                          ^ must be ASCII but is '\u{2069}'
+LL |     println!("{:?}", br##"/*� } �if isAdmin� � begin admins only "##);
+   |                                            ^ must be ASCII but is '\u{2069}'
 
 error: non-ASCII character in raw byte string literal
   --> $DIR/unicode-control-codepoints.rs:21:46
    |
-LL |     println!("{:?}", br##"/* } if isAdmin  begin admins only "##);
-   |                                           ^ must be ASCII but is '\u{2066}'
+LL |     println!("{:?}", br##"/*� } �if isAdmin� � begin admins only "##);
+   |                                              ^ must be ASCII but is '\u{2066}'
 
 error: unicode codepoint changing visible direction of text present in comment
   --> $DIR/unicode-control-codepoints.rs:2:5
    |
-LL |     // if access_level != "user" { // Check if admin
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^--^^^^^^^^^^^^^^^^^^^^^
-   |     |                        ||
-   |     |                        |'\u{202a}'
+LL |     // if access_level != "us�e�r" { // Check if admin
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^-^-^^^^^^^^^^^^^^^^^^^^^^
+   |     |                        | |
+   |     |                        | '\u{202a}'
    |     |                        '\u{202b}'
    |     this comment contains invisible unicode text flow control codepoints
    |
@@ -99,12 +99,12 @@ LL |     // if access_level != "user" { // Check if admin
 error: unicode codepoint changing visible direction of text present in comment
   --> $DIR/unicode-control-codepoints.rs:30:1
    |
-LL | //"/* } if isAdmin  begin admins only */"
-   | ^^^^^-^^-^^^^^^^^^--^^^^^^^^^^^^^^^^^^^^^
-   | |    |  |         ||
-   | |    |  |         |'\u{2066}'
-   | |    |  |         '\u{2069}'
-   | |    |  '\u{2066}'
+LL | //"/*� } �if isAdmin� � begin admins only */"
+   | ^^^^^-^^^-^^^^^^^^^^-^-^^^^^^^^^^^^^^^^^^^^^^
+   | |    |   |          | |
+   | |    |   |          | '\u{2066}'
+   | |    |   |          '\u{2069}'
+   | |    |   '\u{2066}'
    | |    '\u{202e}'
    | this comment contains invisible unicode text flow control codepoints
    |
@@ -114,12 +114,12 @@ LL | //"/* } if isAdmin  begin admins only */"
 error: unicode codepoint changing visible direction of text present in literal
   --> $DIR/unicode-control-codepoints.rs:11:22
    |
-LL |     println!("{:?}", "/* } if isAdmin  begin admins only ");
-   |                      ^^^-^^-^^^^^^^^^--^^^^^^^^^^^^^^^^^^^
-   |                      |  |  |         ||
-   |                      |  |  |         |'\u{2066}'
-   |                      |  |  |         '\u{2069}'
-   |                      |  |  '\u{2066}'
+LL |     println!("{:?}", "/*� } �if isAdmin� � begin admins only ");
+   |                      ^^^-^^^-^^^^^^^^^^-^-^^^^^^^^^^^^^^^^^^^^
+   |                      |  |   |          | |
+   |                      |  |   |          | '\u{2066}'
+   |                      |  |   |          '\u{2069}'
+   |                      |  |   '\u{2066}'
    |                      |  '\u{202e}'
    |                      this literal contains invisible unicode text flow control codepoints
    |
@@ -134,12 +134,12 @@ LL |     println!("{:?}", "/*\u{202e} } \u{2066}if isAdmin\u{2069} \u{2066} begi
 error: unicode codepoint changing visible direction of text present in literal
   --> $DIR/unicode-control-codepoints.rs:14:22
    |
-LL |     println!("{:?}", r##"/* } if isAdmin  begin admins only "##);
-   |                      ^^^^^^-^^-^^^^^^^^^--^^^^^^^^^^^^^^^^^^^^^
-   |                      |     |  |         ||
-   |                      |     |  |         |'\u{2066}'
-   |                      |     |  |         '\u{2069}'
-   |                      |     |  '\u{2066}'
+LL |     println!("{:?}", r##"/*� } �if isAdmin� � begin admins only "##);
+   |                      ^^^^^^-^^^-^^^^^^^^^^-^-^^^^^^^^^^^^^^^^^^^^^^
+   |                      |     |   |          | |
+   |                      |     |   |          | '\u{2066}'
+   |                      |     |   |          '\u{2069}'
+   |                      |     |   '\u{2066}'
    |                      |     '\u{202e}'
    |                      this literal contains invisible unicode text flow control codepoints
    |
@@ -153,8 +153,8 @@ LL |     println!("{:?}", r##"/*\u{202e} } \u{2066}if isAdmin\u{2069} \u{2066} b
 error: unicode codepoint changing visible direction of text present in literal
   --> $DIR/unicode-control-codepoints.rs:26:22
    |
-LL |     println!("{:?}", '');
-   |                      ^-
+LL |     println!("{:?}", '�');
+   |                      ^-^
    |                      ||
    |                      |'\u{202e}'
    |                      this literal contains an invisible unicode text flow control codepoint
@@ -169,8 +169,8 @@ LL |     println!("{:?}", '\u{202e}');
 error: unicode codepoint changing visible direction of text present in doc comment
   --> $DIR/unicode-control-codepoints.rs:33:1
    |
-LL | /**  ''); */fn foo() {}
-   | ^^^^^^^^^^^^ this doc comment contains an invisible unicode text flow control codepoint
+LL | /**  '�'); */fn foo() {}
+   | ^^^^^^^^^^^^^ this doc comment contains an invisible unicode text flow control codepoint
    |
    = note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
    = note: if their presence wasn't intentional, you can remove them
@@ -181,8 +181,8 @@ error: unicode codepoint changing visible direction of text present in doc comme
    |
 LL | / /**
 LL | |  *
-LL | |  *  ''); */fn bar() {}
-   | |___________^ this doc comment contains an invisible unicode text flow control codepoint
+LL | |  *  '�'); */fn bar() {}
+   | |____________^ this doc comment contains an invisible unicode text flow control codepoint
    |
    = note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
    = note: if their presence wasn't intentional, you can remove them
diff --git a/tests/ui/parser/unmatched-delimiter-at-end-of-file.stderr b/tests/ui/parser/unmatched-delimiter-at-end-of-file.stderr
index c6960892b2b..192f5324935 100644
--- a/tests/ui/parser/unmatched-delimiter-at-end-of-file.stderr
+++ b/tests/ui/parser/unmatched-delimiter-at-end-of-file.stderr
@@ -2,7 +2,7 @@ error: this file contains an unclosed delimiter
   --> $DIR/unmatched-delimiter-at-end-of-file.rs:11:63
    |
 LL | fn foo() {
-   |          - unclosed delimiter                                 ^
+   |          - unclosed delimiter                                ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/use-unclosed-brace.stderr b/tests/ui/parser/use-unclosed-brace.stderr
index 6e624cb9131..1e62a0a06a3 100644
--- a/tests/ui/parser/use-unclosed-brace.stderr
+++ b/tests/ui/parser/use-unclosed-brace.stderr
@@ -5,7 +5,7 @@ LL | use foo::{bar, baz;
    |          - unclosed delimiter
 ...
 LL | fn main() {}
-   |              ^
+   |             ^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/parser/utf16-be-without-bom.stderr b/tests/ui/parser/utf16-be-without-bom.stderr
index c041f3ecf53..55ebf7aacd2 100644
--- a/tests/ui/parser/utf16-be-without-bom.stderr
+++ b/tests/ui/parser/utf16-be-without-bom.stderr
Binary files differdiff --git a/tests/ui/parser/utf16-le-without-bom.stderr b/tests/ui/parser/utf16-le-without-bom.stderr
index cc2220441ac..ad272a70f06 100644
--- a/tests/ui/parser/utf16-le-without-bom.stderr
+++ b/tests/ui/parser/utf16-le-without-bom.stderr
Binary files differ