-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add #[allow(unused_imports)] lint to unstable reexports #21
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #21 +/- ##
==========================================
+ Coverage 89.72% 89.93% +0.21%
==========================================
Files 4 4
Lines 613 626 +13
==========================================
+ Hits 550 563 +13
Misses 63 63 ☔ View full report in Codecov by Sentry. |
- renamed impl_has_visibility to impl_item_like - reordered matches so they flow better top to bottom - added back whitespace (makes things a bit easier to read) - added comments to document what's happening - renamed allows to lin - made the syntax for specifying allowed lints like a normal attribute
Hey there, this makes sense. Thanks I tweaked this a bit in 0063cc1
Does this seem ok to you? Anything else you'd modify? I did these changes myself rather than throwing them back your way as I wasn't sure if they'd work / be simpler and the time spent to confirm that was the same as implementing it. The comments were there from trying to understand the change. For the squash commit mesage, something like:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll merge and release this as-is if I don't hear from you in a few days, or sooner if you're fine with my changes.
Thanks, I don't think I mind the changes, except that the macro's usage looks very weird to me. impl_item_like!(
syn::ItemType,
syn::ItemEnum,
syn::ItemFn,
syn::ItemMod,
syn::ItemTrait,
syn::ItemConst,
syn::ItemStatic,
#[allow(unused_imports)]
syn::ItemUse,
); This looks like the |
I think that worry is a reasonable and I agree it does look a bit odd. I also thought that the change with just the square brackets looked similarly odd. I think most of this stems from the way the macro is constructed, so resolving it would be a more major rewrite. But I think for now (with the comments) the implementation is pragmatic enough. Because this isn't a user facing macro / part of the code, it can be changed in future if needed. |
The example shows what the PR does - we no longer have to mark reexports with
#[allow(unused_imports)]
.