EmbarkStudios / EmbarkStudios/mirror-mirror
`Reflect` derive macro uses wildcard imports
- Dominant language
- Rust
- Stars
- 101
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When using `#[derive(Reflect)]` inside a workspace where the [`clippy::wildcard_imports` lint](https://rust-lang.github.io/rust-clippy/master/index.html#/wildcard_imports) 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?
Contributor guide
Research direction
Start by reproducing the reported `#[derive(Reflect)]` failure with `clippy::wildcard_imports` disallowed and `-D warnings`. Inspect the derive macro expansion to identify the wildcard imports, then verify that the lint no longer fails while reflection generation remains functional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100