-
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
macro expn detection in mut_mut.rs #68
Conversation
Can we refactor this so that the expn-checking bit is more generic (and can be used by other lints)? |
Oh wait it is, I see. |
I'd like to have extensive tests for this macro detection thingy btw; it seems like something that could go wrong easily. |
Agreed. Are you OK with including regexp as a dev-dependency? |
sure :) |
I removed the macro origin check because the So, this needs more tests. I'll see if I can create a copy of the mut_ptr! macro in another sub-crate and see if this still triggers |
For what it's worth, I have another uncommitted version that filters out everything that is not a simple |
…latter have no working source (note: may fail in the face of compiler plugins doing whatever they like with spans), also one more run-pass test
This was surprisingly easy, as extra-crate macros either don't have source at all or (in the case of regex! and builtins) have synthesized source that does not start with @Manishearth barring any pain points from your site, I think this should be ready to merge and close issue #67. |
macro expn detection in mut_mut.rs
This relates to issue #67. We should add more tests, but I'm not too versed in macros, I'll have to learn them first.
&mut &mut
by internal macro should warn