about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-09-11 20:02:33 +0000
committerMichael Goulet <michael@errs.io>2022-09-12 22:08:30 +0000
commitc2cff68d8445fc2bcaff060a8b78993939f33878 (patch)
tree8f8ffb103a6ed90f2ea387cb3157f707a205c021 /src
parent370c816a71742373401fd3c75699c04f1ceaf81f (diff)
downloadrust-c2cff68d8445fc2bcaff060a8b78993939f33878.tar.gz
rust-c2cff68d8445fc2bcaff060a8b78993939f33878.zip
Don't trim substitution if it's only whitespace
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/rust-2021/reserved-prefixes-migration.stderr10
-rw-r--r--src/test/ui/rust-2021/reserved-prefixes.stderr18
2 files changed, 14 insertions, 14 deletions
diff --git a/src/test/ui/rust-2021/reserved-prefixes-migration.stderr b/src/test/ui/rust-2021/reserved-prefixes-migration.stderr
index 94f9bb57cc8..c6bc082cf18 100644
--- a/src/test/ui/rust-2021/reserved-prefixes-migration.stderr
+++ b/src/test/ui/rust-2021/reserved-prefixes-migration.stderr
@@ -14,7 +14,7 @@ LL | #![warn(rust_2021_prefixes_incompatible_syntax)]
 help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
    |
 LL |     m2!(z "hey");
-   |
+   |          +
 
 warning: prefix `prefix` is unknown
   --> $DIR/reserved-prefixes-migration.rs:19:9
@@ -27,7 +27,7 @@ LL |     m2!(prefix"hey");
 help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
    |
 LL |     m2!(prefix "hey");
-   |
+   |               +
 
 warning: prefix `hey` is unknown
   --> $DIR/reserved-prefixes-migration.rs:22:9
@@ -40,7 +40,7 @@ LL |     m3!(hey#123);
 help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
    |
 LL |     m3!(hey #123);
-   |
+   |            +
 
 warning: prefix `hey` is unknown
   --> $DIR/reserved-prefixes-migration.rs:25:9
@@ -53,7 +53,7 @@ LL |     m3!(hey#hey);
 help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
    |
 LL |     m3!(hey #hey);
-   |
+   |            +
 
 warning: prefix `kind` is unknown
   --> $DIR/reserved-prefixes-migration.rs:35:14
@@ -66,7 +66,7 @@ LL |     #name = #kind#value
 help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021
    |
 LL |     #name = #kind #value
-   |
+   |                  +
 
 warning: 5 warnings emitted
 
diff --git a/src/test/ui/rust-2021/reserved-prefixes.stderr b/src/test/ui/rust-2021/reserved-prefixes.stderr
index fcda5fcac5b..807d6d98bd3 100644
--- a/src/test/ui/rust-2021/reserved-prefixes.stderr
+++ b/src/test/ui/rust-2021/reserved-prefixes.stderr
@@ -8,7 +8,7 @@ LL |     demo3!(foo#bar);
 help: consider inserting whitespace here
    |
 LL |     demo3!(foo #bar);
-   |
+   |               +
 
 error: prefix `foo` is unknown
   --> $DIR/reserved-prefixes.rs:17:12
@@ -20,7 +20,7 @@ LL |     demo2!(foo"bar");
 help: consider inserting whitespace here
    |
 LL |     demo2!(foo "bar");
-   |
+   |               +
 
 error: prefix `foo` is unknown
   --> $DIR/reserved-prefixes.rs:18:12
@@ -32,7 +32,7 @@ LL |     demo2!(foo'b');
 help: consider inserting whitespace here
    |
 LL |     demo2!(foo 'b');
-   |
+   |               +
 
 error: prefix `foo` is unknown
   --> $DIR/reserved-prefixes.rs:20:12
@@ -44,7 +44,7 @@ LL |     demo2!(foo'b);
 help: consider inserting whitespace here
    |
 LL |     demo2!(foo 'b);
-   |
+   |               +
 
 error: prefix `foo` is unknown
   --> $DIR/reserved-prefixes.rs:21:12
@@ -56,7 +56,7 @@ LL |     demo3!(foo# bar);
 help: consider inserting whitespace here
    |
 LL |     demo3!(foo # bar);
-   |
+   |               +
 
 error: prefix `foo` is unknown
   --> $DIR/reserved-prefixes.rs:22:12
@@ -68,7 +68,7 @@ LL |     demo4!(foo#! bar);
 help: consider inserting whitespace here
    |
 LL |     demo4!(foo #! bar);
-   |
+   |               +
 
 error: prefix `foo` is unknown
   --> $DIR/reserved-prefixes.rs:23:12
@@ -80,7 +80,7 @@ LL |     demo4!(foo## bar);
 help: consider inserting whitespace here
    |
 LL |     demo4!(foo ## bar);
-   |
+   |               +
 
 error: prefix `foo` is unknown
   --> $DIR/reserved-prefixes.rs:25:12
@@ -92,7 +92,7 @@ LL |     demo4!(foo#bar#);
 help: consider inserting whitespace here
    |
 LL |     demo4!(foo #bar#);
-   |
+   |               +
 
 error: prefix `bar` is unknown
   --> $DIR/reserved-prefixes.rs:25:16
@@ -104,7 +104,7 @@ LL |     demo4!(foo#bar#);
 help: consider inserting whitespace here
    |
 LL |     demo4!(foo#bar #);
-   |
+   |                   +
 
 error: aborting due to 9 previous errors