diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2016-10-23 17:22:06 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2016-11-22 13:42:36 -0800 |
| commit | eb53ca3aad616069cb8f6f8fff71c27e9ba9640c (patch) | |
| tree | 8b305f44c0527577d57be9cc693465dd3b74f7e5 /src/test/ui/missing-items | |
| parent | fb122199aac1fd4f9a3c133e25791a9fcb2a6b83 (diff) | |
Show multiline spans in full if short enough
When dealing with multiline spans that span few lines, show the complete
span instead of restricting to the first character of the first line.
For example, instead of:
```
% ./rustc foo.rs
error[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied
--> foo.rs:13:9
|
13 | foo(1 + bar(x,
| ^ trait `{integer}: std::ops::Add<()>` not satisfied
|
```
show
```
% ./rustc foo.rs
error[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied
--> foo.rs:13:9
|
13 | foo(1 + bar(x,
| ________^ starting here...
14 | | y),
| |_____________^ ...ending here: trait `{integer}: std::ops::Add<()>` not satisfied
|
```
Diffstat (limited to 'src/test/ui/missing-items')
| -rw-r--r-- | src/test/ui/missing-items/m2.stderr | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/ui/missing-items/m2.stderr b/src/test/ui/missing-items/m2.stderr index caeb9ff415c..33135434544 100644 --- a/src/test/ui/missing-items/m2.stderr +++ b/src/test/ui/missing-items/m2.stderr @@ -3,8 +3,10 @@ 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 { - | ^ missing `CONSTANT`, `Type`, `method` in implementation +20 | impl m1::X for X { + | _^ starting here... +21 | | } + | |_^ ...ending here: missing `CONSTANT`, `Type`, `method` in implementation | = note: `CONSTANT` from trait: `const CONSTANT: u32;` = note: `Type` from trait: `type Type;` |
