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

Wrap EarlyContext::visit_local/visit_expr in with_lint_attrs calls #30487

Merged
merged 2 commits into from
Jan 27, 2016
Merged

Wrap EarlyContext::visit_local/visit_expr in with_lint_attrs calls #30487

merged 2 commits into from
Jan 27, 2016

Conversation

jonas-schievink
Copy link
Contributor

LateContext already does this, looks like this was just forgotten in #29850.

Found while investigating #30326 (but doesn't fix it)

LateContext already does this, looks like this was just forgotten in
#29850
@rust-highfive
Copy link
Collaborator

r? @jroesch

(rust_highfive has picked a reviewer for you, use r? to override)

@jonas-schievink
Copy link
Contributor Author

cc @Kimundi

@Kimundi
Copy link
Member

Kimundi commented Dec 21, 2015

Ah, yeah I didn't notice there being another lint visitor. Could you add some tests that show the new code working?

@jonas-schievink
Copy link
Contributor Author

Huh. For some reason, the first 2 allows in this test aren't applied correctly:

fn main() {
    #[allow(unused_parens)]
    let _ = (9);

    let _ = #[allow(unused_parens)] (9);

    // This now works:
    #[allow(unused_parens)]
    {
        let _ = (9);
    }
}

Any idea what's going on here? (or is this a separate issue?)

Anyways, I've pushed a test for the last case, in case this is a different issue.

@alexcrichton
Copy link
Member

@bors: r+ 5133b26

@bors
Copy link
Contributor

bors commented Jan 27, 2016

⌛ Testing commit 5133b26 with merge b694d1b...

bors added a commit that referenced this pull request Jan 27, 2016
…richton

`LateContext` already does this, looks like this was just forgotten in #29850.

Found while investigating #30326 (but doesn't fix it)
@bors bors merged commit 5133b26 into rust-lang:master Jan 27, 2016
@jonas-schievink jonas-schievink deleted the more-attrs-lint-fixes branch July 9, 2016 09:53
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.

6 participants