| Age | Commit message (Collapse) | Author | Lines |
|
Now that we've got a beta build, let's use it!
|
|
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.
|
|
|
|
|
|
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
Revert "Remove unused methods from MultiSpan"
This reverts commit f7019a4e2f80577d38ec35fcebd64d5970b15f78.
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
|
|
This reverts commit f7019a4e2f80577d38ec35fcebd64d5970b15f78.
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.
|
|
|
|
|
|
|
|
|