about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2022-12-27 11:03:59 -0800
committerEsteban Küber <esteban@kuber.com.ar>2022-12-29 09:13:40 -0800
commit315bb10405ec6082f46c73791bed24a134a307c7 (patch)
treef7a69119717688e098a0c3eb6dc2d8b0653e0a1a
parent24444945ec96dbe0dd593ed5bda57d22464a7106 (diff)
downloadrust-315bb10405ec6082f46c73791bed24a134a307c7.tar.gz
rust-315bb10405ec6082f46c73791bed24a134a307c7.zip
Account for multiple multiline spans with empty padding
Instead of

```
LL |    fn oom(
   |  __^
   | | _|
   | ||
LL | || ) {
   | ||_-
LL | |  }
   | |__^
```

emit

```
LL | // fn oom(
LL | || ) {
   | ||_-
LL | |  }
   | |__^
   ```
-rw-r--r--tests/ui/async_yields_async.stderr6
-rw-r--r--tests/ui/result_map_unit_fn_unfixable.stderr5
2 files changed, 3 insertions, 8 deletions
diff --git a/tests/ui/async_yields_async.stderr b/tests/ui/async_yields_async.stderr
index 92ba3592967..22ce1c6f647 100644
--- a/tests/ui/async_yields_async.stderr
+++ b/tests/ui/async_yields_async.stderr
@@ -3,8 +3,7 @@ error: an async construct yields a type which is itself awaitable
    |
 LL |        let _h = async {
    |  _____________________-
-LL | |          async {
-   | | _________^
+LL | |/         async {
 LL | ||             3
 LL | ||         }
    | ||_________^ awaitable value not awaited
@@ -37,8 +36,7 @@ error: an async construct yields a type which is itself awaitable
    |
 LL |        let _j = async || {
    |  ________________________-
-LL | |          async {
-   | | _________^
+LL | |/         async {
 LL | ||             3
 LL | ||         }
    | ||_________^ awaitable value not awaited
diff --git a/tests/ui/result_map_unit_fn_unfixable.stderr b/tests/ui/result_map_unit_fn_unfixable.stderr
index 2e1eb8eb180..d0e534f6356 100644
--- a/tests/ui/result_map_unit_fn_unfixable.stderr
+++ b/tests/ui/result_map_unit_fn_unfixable.stderr
@@ -19,10 +19,7 @@ LL |     x.field.map(|value| if value > 0 { do_nothing(value); do_nothing(value)
 error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
   --> $DIR/result_map_unit_fn_unfixable.rs:29:5
    |
-LL |        x.field.map(|value| {
-   |  ______^
-   | | _____|
-   | ||
+LL | //     x.field.map(|value| {
 LL | ||         do_nothing(value);
 LL | ||         do_nothing(value)
 LL | ||     });