Rocket
Rocket copied to clipboard
basic clippy warnings get triggered by macros
Description
rocket::post()proc macro triggersclippy::unused-unitrocket::routes!triggersclippy::no-effect-underscore-binding
To Reproduce
Enable corresponding lints and run clippy.
Expected Behavior
No clippy warnings for basic clippy warnings.
Environment:
- OS Distribution and Kernel: Linux
- Rocket Version: 0.5rc2
We don't consider these bugs, but if we can improve codegen to prevent these lints from triggering, then great! Please feel free to send a PR.
I would suggest running cargo expand to determine which part of the generated code is causing the lint to fire and then looking at/grepping the codegen crate to find/modify the generation site.
We don't consider these bugs
Agreed, it's technically not a bug. But it's terrible macro hygiene. Your generated code shouldn't trigger lints in my crates.
We don't consider these bugs
Agreed, it's technically not a bug. But it's terrible macro hygiene. Your generated code shouldn't trigger lints in my crates.
This doesn't have anything to do with macro hygiene. What's more, this isn't rocket triggering warnings in your code, this is an external tool, clippy, that you're running yourself, triggering a warning, often erroneously. Finally, I'm confused by the seeming condescension (my apologies if I'm reading your message incorrectly). I have no opposition to improving codegen to resolve issues of this sort; my entire prior comment, excepting the first sentence, should make this clear. My "we don't consider these bugs" comment was simply a matter of ontology.
My apologies if this came across condescending. That's not the intention. I don't agree with your statement but I also think we both have made our points already.