about summary refs log tree commit diff
path: root/src/libsyntax/errors
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2016-05-06 19:26:30 +0200
committerGeorg Brandl <georg@python.org>2016-05-10 08:35:37 +0200
commitb62e7ff18d4030ef929226f9b92d83dbc5e67000 (patch)
treea73e19492621729ff150485651fb0ea5d645069d /src/libsyntax/errors
parent72ed7e78942e8d68f87cc7299625fb236f442ef1 (diff)
downloadrust-b62e7ff18d4030ef929226f9b92d83dbc5e67000.tar.gz
rust-b62e7ff18d4030ef929226f9b92d83dbc5e67000.zip
resolve: do not modify span of non-importable name
This span modification is probably leftover from a time when
import spans were assigned differently.

With this change, error spans for the following are properly reported:

```
use abc::one_el;
use abc::{a, bbb, cccccc};
use a_very_long_name::{el, el2};
```

before (spans only):
```
x.rs:3 use abc::one_el;
           ^~~
x.rs:4 use abc::{a, bbb, cccccc};
                 ^~~
x.rs:4 use abc::{a, bbb, cccccc};
                    ^~~
x.rs:4 use abc::{a, bbb, cccccc};
                         ^~~
(internal compiler error: unprintable span)
(internal compiler error: unprintable span)
```

after:
```
x.rs:3 use abc::one_el;
           ^~~~~~~~~~~
x.rs:4 use abc::{a, bbb, cccccc};
                 ^
x.rs:4 use abc::{a, bbb, cccccc};
                    ^~~
x.rs:4 use abc::{a, bbb, cccccc};
                         ^~~~~~
x.rs:5 use a_very_long_name::{el, el2};
                              ^~
x.rs:5 use a_very_long_name::{el, el2};
                                  ^~~
```

Fixes: #33464
Diffstat (limited to 'src/libsyntax/errors')
0 files changed, 0 insertions, 0 deletions