Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More accurate spans #6208

Merged
merged 2 commits into from
May 5, 2013
Merged

More accurate spans #6208

merged 2 commits into from
May 5, 2013

Conversation

sanxiyn
Copy link
Member

@sanxiyn sanxiyn commented May 3, 2013

No description provided.

@sanxiyn
Copy link
Member Author

sanxiyn commented May 3, 2013

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