Skip to content

More accurate spans#6208

Merged
bors merged 2 commits into
rust-lang:incomingfrom
sanxiyn:accurate-span
May 5, 2013
Merged

More accurate spans#6208
bors merged 2 commits into
rust-lang:incomingfrom
sanxiyn:accurate-span

Conversation

@sanxiyn

@sanxiyn sanxiyn commented May 3, 2013

Copy link
Copy Markdown
Contributor

No description provided.

@sanxiyn

sanxiyn commented May 3, 2013

Copy link
Copy Markdown
Contributor Author

Given

#[deny(wrong_span)];
extern mod std;
use std::bigint;
use std::{treemap};
fn main() {
    let var = 1;
}

Now we get

test.rs:1:7: 1:17 warning: unknown `deny` attribute: `wrong_span`
test.rs:1 #[deny(wrong_span)];
                 ^~~~~~~~~~
test.rs:3:4: 3:15 warning: unused import
test.rs:3 use std::bigint;
              ^~~~~~~~~~~
test.rs:4:10: 4:17 warning: unused import
test.rs:4 use std::{treemap};
                    ^~~~~~~
test.rs:6:8: 6:11 warning: unused variable: `var`
test.rs:6     let var = 1;
                  ^~~

Previously all warning spans were off by one token.

@bors bors closed this May 5, 2013
@bors bors merged commit aca2a00 into rust-lang:incoming May 5, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 3, 2020
Add lint for replacing `.map().collect()` with `.try_for_each()`

Fixes rust-lang#6208

changelog: Add `map_collect_result_unit`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants