]> git.lizzy.rs Git - rust.git/commit
Auto merge of #41245 - estebank:multiline-trim, r=nikomatsakis
authorbors <bors@rust-lang.org>
Fri, 21 Apr 2017 06:59:25 +0000 (06:59 +0000)
committerbors <bors@rust-lang.org>
Fri, 21 Apr 2017 06:59:25 +0000 (06:59 +0000)
commit4ed95009d8d5d50c4f7aee35ad89c30a2258ffa9
tree8f4920ff93eb073f76ed49c478995f29efc209ee
parent535ee6c7f05e29a6e94edba06b228d64f8ba74ec
parentcc07c357e421eebff58eb6948c8e1412ae7d8069
Auto merge of #41245 - estebank:multiline-trim, r=nikomatsakis

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
```

Re: #38246.

r? @nikomatsakis CC @jonathandturner