-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-edition-2018Area: The 2018 editionArea: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.F-rust_2018_preview`#![feature(rust_2018_preview)]``#![feature(rust_2018_preview)]`I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Milestone
Description
This code currently compiles on nightly:
#![warn(rust_2018_compatibility)]
#![feature(rust_2018_preview)]
macro_rules! r#async {
() => ()
}
fn main() {
async!();
}
.. with no warnings, but it should get a warning about the macro invocation!
cc @zackmdavis, do you know if there's a good location we can run lints before macro expansion? I think the bug here is that the macro is fully expanded by the time we hit the lint passes, so it's not even present in the AST.
Metadata
Metadata
Assignees
Labels
A-edition-2018Area: The 2018 editionArea: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.F-rust_2018_preview`#![feature(rust_2018_preview)]``#![feature(rust_2018_preview)]`I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team