diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2017-04-14 16:38:10 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2017-04-20 17:31:20 -0700 |
| commit | cc07c357e421eebff58eb6948c8e1412ae7d8069 (patch) | |
| tree | 560bdd78cbfc03646386e6d8ed881c901f4bda79 /src/test/ui/compare-method | |
| parent | 968ae7babecfc6c62ef9699ff052d9ab00411848 (diff) | |
| download | rust-cc07c357e421eebff58eb6948c8e1412ae7d8069.tar.gz rust-cc07c357e421eebff58eb6948c8e1412ae7d8069.zip | |
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/compare-method')
| -rw-r--r-- | src/test/ui/compare-method/region-extra-2.stderr | 5 | ||||
| -rw-r--r-- | src/test/ui/compare-method/traits-misc-mismatch-2.stderr | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/test/ui/compare-method/region-extra-2.stderr b/src/test/ui/compare-method/region-extra-2.stderr index 12b0ecabcc7..af974d50183 100644 --- a/src/test/ui/compare-method/region-extra-2.stderr +++ b/src/test/ui/compare-method/region-extra-2.stderr @@ -4,12 +4,11 @@ error[E0276]: impl has stricter requirements than trait 15 | fn renew<'b: 'a>(self) -> &'b mut [T]; | -------------------------------------- definition of `renew` from trait ... -19 | fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b { - | _____^ starting here... +19 | / fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b { 20 | | //~^ ERROR E0276 21 | | &mut self[..] 22 | | } - | |_____^ ...ending here: impl has extra requirement `'a: 'b` + | |_____^ impl has extra requirement `'a: 'b` error: aborting due to previous error diff --git a/src/test/ui/compare-method/traits-misc-mismatch-2.stderr b/src/test/ui/compare-method/traits-misc-mismatch-2.stderr index 77b056f6978..622e144c53a 100644 --- a/src/test/ui/compare-method/traits-misc-mismatch-2.stderr +++ b/src/test/ui/compare-method/traits-misc-mismatch-2.stderr @@ -4,12 +4,11 @@ error[E0276]: impl has stricter requirements than trait 19 | fn zip<B, U: Iterator<U>>(self, other: U) -> ZipIterator<Self, U>; | ------------------------------------------------------------------ definition of `zip` from trait ... -23 | fn zip<B, U: Iterator<B>>(self, other: U) -> ZipIterator<T, U> { - | _____^ starting here... +23 | / fn zip<B, U: Iterator<B>>(self, other: U) -> ZipIterator<T, U> { 24 | | //~^ ERROR E0276 25 | | ZipIterator{a: self, b: other} 26 | | } - | |_____^ ...ending here: impl has extra requirement `U: Iterator<B>` + | |_____^ impl has extra requirement `U: Iterator<B>` error: aborting due to previous error |
