about summary refs log tree commit diff
path: root/src/test/ui/missing-items
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2017-04-14 16:38:10 -0700
committerEsteban Küber <esteban@kuber.com.ar>2017-04-20 17:31:20 -0700
commitcc07c357e421eebff58eb6948c8e1412ae7d8069 (patch)
tree560bdd78cbfc03646386e6d8ed881c901f4bda79 /src/test/ui/missing-items
parent968ae7babecfc6c62ef9699ff052d9ab00411848 (diff)
Reduce visual clutter of multiline start when possible
When a span starts on a line with nothing but whitespace to the left,
and there are no other annotations in that line, simplify the visual
representation of the span.

Go from:

```rust
error[E0072]: recursive type `A` has infinite size
 --> file2.rs:1:1
  |
1 |   struct A {
  |  _^ starting here...
2 | |     a: A,
3 | | }
  | |_^ ...ending here: recursive type has infinite size
  |
```

To:

```rust
error[E0072]: recursive type `A` has infinite size
 --> file2.rs:1:1
  |
1 | / struct A {
2 | |     a: A,
3 | | }
  | |_^ recursive type has infinite size
```

Remove `starting here...`/`...ending here` labels from all multiline
diagnostics.
Diffstat (limited to 'src/test/ui/missing-items')
-rw-r--r--src/test/ui/missing-items/m2.stderr5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/ui/missing-items/m2.stderr b/src/test/ui/missing-items/m2.stderr
index 33135434544..503ce5618d4 100644
--- a/src/test/ui/missing-items/m2.stderr
+++ b/src/test/ui/missing-items/m2.stderr
@@ -3,10 +3,9 @@ error: main function not found
 error[E0046]: not all trait items implemented, missing: `CONSTANT`, `Type`, `method`
   --> $DIR/m2.rs:20:1
    |
-20 |   impl m1::X for X {
-   |  _^ starting here...
+20 | / impl m1::X for X {
 21 | | }
-   | |_^ ...ending here: missing `CONSTANT`, `Type`, `method` in implementation
+   | |_^ missing `CONSTANT`, `Type`, `method` in implementation
    |
    = note: `CONSTANT` from trait: `const CONSTANT: u32;`
    = note: `Type` from trait: `type Type;`