Skip to content

Wrong warning about unused import #50087

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

Closed
antoyo opened this issue Apr 19, 2018 · 4 comments
Closed

Wrong warning about unused import #50087

antoyo opened this issue Apr 19, 2018 · 4 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@antoyo
Copy link
Contributor

antoyo commented Apr 19, 2018

Hi.
In my crate relm, I have an example that shows warnings about unused imports:

warning: unused imports: `ButtonExt`, `LabelExt`, `OrientableExt`, `WidgetExt`
  --> src/main.rs:29:5
   |
29 |     ButtonExt,
   |     ^^^^^^^^^
30 |     Inhibit,
31 |     LabelExt,
   |     ^^^^^^^^
32 |     OrientableExt,
   |     ^^^^^^^^^^^^^
33 |     WidgetExt,
   |     ^^^^^^^^^
   |
   = note: #[warn(unused_imports)] on by default

But if I comment them, I get compile errors because these import are actually needed.
Thanks to fix the issue.

@estebank estebank added the A-diagnostics Area: Messages for errors, warnings, and lints label Apr 19, 2018
@ExpHP
Copy link
Contributor

ExpHP commented Apr 20, 2018

Looks like #45268. My guess is that one of those macros used by the example generates a mod and uses use super::* inside of it?

@antoyo
Copy link
Contributor Author

antoyo commented Jun 17, 2018

Yes, it does use super::*.

@ExpHP
Copy link
Contributor

ExpHP commented Jun 17, 2018

Okay, for the purposes of keeping things tidy I think this issue should be closed in favor of the other

@antoyo
Copy link
Contributor Author

antoyo commented Jun 18, 2018

You're right.
Closed in favor of #45268.

@antoyo antoyo closed this as completed Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

No branches or pull requests

3 participants