Commit Graph

17 Commits

Author SHA1 Message Date
Esteban Küber a820d99eb2 Group unused import warnings per path list
Given a file

```rust
use std::collections::{BinaryHeap, BTreeMap, BTreeSet};

fn main() {}
```

Show a single warning, instead of three for each unused import:

```nocode
warning: unused imports, #[warn(unused_imports)] on by default
 --> foo.rs:1:24
  |
1 | use std::collections::{BinaryHeap, BTreeMap, BTreeSet};
  |                        ^^^^^^^^^^  ^^^^^^^^  ^^^^^^^^
```

Include support for lints pointing at `MultilineSpan`s, instead of just
`Span`s.
2016-11-08 17:44:21 -08:00
Niko Matsakis f652651275 retool EarlyLint to track a Diagnostic 2016-11-01 14:07:45 -04:00
Felix S. Klock II 3f639a0f11 Do not intern filemap to entry w/ mismatched length. Fix #37274 (I think). 2016-10-28 17:16:34 +02:00
Nick Cameron 9bc6d26092 Stabilise ?
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
2016-10-12 08:40:22 +13:00
bors 6ad10844db Auto merge of #36585 - jonathandturner:misc_error_touchups, r=nrc
Add the ability to merge spans to codemap

This PR adds the ability to merge Spans.  To do so, it builds on the Codemap's ability to verify the locations of spans, namely that following can be verified:

* the expn_id of both spans much match
* the lhs span needs to end on the same line the rhs span begins
* the lhs span must start at or before the rhs span

If all of these are met, a new span is returned that is min(lo), max(hi) of the two spans.

This PR also removes an older Span merge, as this new functionality subsumes it.

r? @nrc
2016-09-21 22:40:51 -07:00
Eduard Burtescu 221d1a97e5 serialize: allow specifying the default behavior for specializations. 2016-09-20 20:08:06 +03:00
Eduard Burtescu fc363cb482 rustc_metadata: go only through rustc_serialize in astencode. 2016-09-20 20:07:54 +03:00
Jonathan Turner 2ea3ab3a90 Add the ability to merge spans to codemap 2016-09-19 12:31:56 -07:00
Michael Woerister e355ec1c6a incr.comp.: Add stable hashing of HIR spans to ICH. 2016-09-01 09:43:44 -04:00
Jonathan Turner 61865384b8 Replace local backtrace with def-use, repair std macro spans 2016-08-17 14:26:14 -07:00
Manish Goregaokar 6ea3ef7ac2 Rollup merge of #35094 - mcarton:multispan, r=jonathandturner
Revert "Remove unused methods from MultiSpan"

This reverts commit f7019a4e2f.

That commit removed the only way to make a suggestion with more than one substitute. That feature is not used directly by rustc but exists and is used by Clippy. Bring it back until we come up with a better solution (suggestions don't use span labels, so it would make sense for them to use their own type).
Rational there: https://github.com/Manishearth/rust-clippy/pull/1119.

r? @jonathandturner
Cc @Manishearth
2016-07-30 13:44:47 +05:30
mcarton 6dc98cf099 Revert "Remove unused methods from MultiSpan"
This reverts commit f7019a4e2f.

This removed the only way to make a suggestion with more than one
substitute. Bring it back until we come up with a better solution.
2016-07-28 19:33:31 +02:00
cgswords 5553901146 Adressed PR comments. 2016-07-25 14:27:10 -07:00
Jonathan Turner f7019a4e2f Remove unused methods from MultiSpan 2016-07-21 12:38:15 -07:00
Jonathan Turner 71ec2867e3 Implement latest rfc style using simpler rendering 2016-07-14 07:57:46 -04:00
Jonathan Turner 2829fbc638 Address comments and fix travis warning 2016-06-23 08:07:35 -04:00
Jonathan Turner 6ae3502134 Move errors from libsyntax to its own crate 2016-06-23 08:07:35 -04:00