Skip to content
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

Reflect derive macro uses wildcard imports #147

Open
MarijnS95 opened this issue Jun 19, 2024 · 1 comment
Open

Reflect derive macro uses wildcard imports #147

MarijnS95 opened this issue Jun 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@MarijnS95
Copy link

Describe the bug
When using #[derive(Reflect)] inside a workspace where the clippy::wildcard_imports lint is disallowed, it fails the linter:

error: usage of wildcard import
  --> test.rs:75:35
   |
75 |   #[derive(Component, Clone, Debug, Reflect)]
   |                                     ^------
   |                                     |
   |  ___________________________________in this derive macro expansion
   | |
76 | | pub struct Foo {
   | |___^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
   = note: `-D clippy::wildcard-imports` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::wildcard_imports)]`
   = note: this error originates in the derive macro `Reflect` (in Nightly builds, run with -Z macro-backtrace for more info)

Is there any particular reason why these wildcard imports are used, and if so, can they be annotated
with a #[allow] internally?

@MarijnS95 MarijnS95 added the bug Something isn't working label Jun 19, 2024
@davidpdrsn
Copy link
Contributor

Is there any particular reason why these wildcard imports are used

Makes our lives so much easier. Wildcard imports are good :)

Adding #[allow] is fine. Do you wanna submit a PR perhaps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants