-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
also lint on items after statements in macros #578
Labels
C-bug
Category: Clippy is not doing the correct thing
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
good-first-issue
These issues are a good way to get started with Clippy
T-macros
Type: Issues with macros and macro expansion
Comments
Manishearth
added
C-bug
Category: Clippy is not doing the correct thing
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
labels
Jan 28, 2016
The Just because I had to edit github urls to find it for context, here's a link to the original lint on items after statements PR |
#![warn(clippy::items_after_statements)]
macro_rules! m {
() => {{
f();
fn f() { println!("Hi"); }
}};
}
fn main() {
m!();
} Does not emit a warning currently: Playground. I don't see a reason, why we shouldn't lint this in local macros. |
flip1995
added
good-first-issue
These issues are a good way to get started with Clippy
T-macros
Type: Issues with macros and macro expansion
labels
Jul 31, 2020
bors
added a commit
that referenced
this issue
Oct 29, 2020
Lint items after statements in local macro expansions The items_after_statements lint was skipping all expansions. Instead we should still lint local macros. Fixes #578 --- *Please keep the line below* changelog: The items_after_statements now applies to local macro expansions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: Clippy is not doing the correct thing
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
good-first-issue
These issues are a good way to get started with Clippy
T-macros
Type: Issues with macros and macro expansion
This is currently disabled, because it would make e.g. the
regex!
macro very annoying. Should probably be turned on afterregex!
has been fixed.The text was updated successfully, but these errors were encountered: