about summary refs log tree commit diff
path: root/src/test/ui/empty/empty-struct-unit-expr.stderr
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-08-11 19:26:01 +0000
committerbors <bors@rust-lang.org>2021-08-11 19:26:01 +0000
commitccffcafd55e58f769d4b0efc0064bf65e76998e4 (patch)
tree725b619b120ee18a4bada33b6f7fb4385e06d6df /src/test/ui/empty/empty-struct-unit-expr.stderr
parent362e0f55eb1f36d279e5c4a58fb0fe5f9a2c579d (diff)
parent657caa5bf293e9d910a54dac10dc536e7c26e50b (diff)
Auto merge of #86532 - estebank:delete-suggestion-underline, r=petrochenkov
Make deleted code in a suggestion clearer

Show suggestions that include deletions in a way similar to `diff`'s output.

<img width="628" alt="" src="https://user-images.githubusercontent.com/1606434/123350316-9078e580-d50f-11eb-89b9-78431b85e23f.png">

For changes that do not have deletions, use `+` as an underline for additions and `~` as an underline for replacements.

<img width="631" alt="" src="https://user-images.githubusercontent.com/1606434/123701745-1ac68f80-d817-11eb-950b-09e5afd7532f.png">

For multiline suggestions, we now use `~` in the gutter to signal replacements and `+` to signal whole line replacements/additions.

<img width="834" alt="" src="https://user-images.githubusercontent.com/1606434/123701331-8eb46800-d816-11eb-9dcd-ef9098071afb.png">

In all cases we now use color to highlight the specific spans and snippets.
Diffstat (limited to 'src/test/ui/empty/empty-struct-unit-expr.stderr')
-rw-r--r--src/test/ui/empty/empty-struct-unit-expr.stderr4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/empty/empty-struct-unit-expr.stderr b/src/test/ui/empty/empty-struct-unit-expr.stderr
index 50b0e19133e..1023950639a 100644
--- a/src/test/ui/empty/empty-struct-unit-expr.stderr
+++ b/src/test/ui/empty/empty-struct-unit-expr.stderr
@@ -23,7 +23,7 @@ LL |     let e4 = E::Empty4();
 help: `E::Empty4` is a unit variant, you need to write it without the parenthesis
    |
 LL |     let e4 = E::Empty4;
-   |              ^^^^^^^^^
+   |              ~~~~~~~~~
 
 error[E0618]: expected function, found `empty_struct::XEmpty2`
   --> $DIR/empty-struct-unit-expr.rs:18:15
@@ -44,7 +44,7 @@ LL |     let xe4 = XE::XEmpty4();
 help: `XE::XEmpty4` is a unit variant, you need to write it without the parenthesis
    |
 LL |     let xe4 = XE::XEmpty4;
-   |               ^^^^^^^^^^^
+   |               ~~~~~~~~~~~
 
 error: aborting due to 4 previous errors