-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rust beta/nightly has a false positive #[warn(unused_imports)] that's not in stable #39225
Comments
cc @jseyfried |
Compiles for me on nightly/beta with that line removed. (Edit: fails on stable though) It seems the Example here https://play.rust-lang.org/?gist=c6b422dfbdfa63519ce0e72f597c5a87&version=nightly&backtrace=0 |
Interesting. Removing that line in beta compiles but not in stable where it fails with the BitPump stuff. |
Could it be something to do with the two modules requiring each other? |
I've been able to generate a minimal test case for this and it seems you need this specific situation of a submodule and module including each other. Two modules at the same level including each other doesn't work. |
This was caused by stabilizing RFC 1560 (now in beta), specifically this change and this change. |
When compiling /~https://github.com/pedrocr/rawloader with rust beta or nightly I get an unused_import warning that's a false positive (the compile fails without that import). The import in question is the following:
/~https://github.com/pedrocr/rawloader/blob/rawloader-0.29.0/src/decoders/ljpeg/decompressors.rs#L3
With stable everything works fine. The import is a little too broad (need to break up that code) and changing it to just the two structs that are needed fixes the warning. Still seems like a bug.
The text was updated successfully, but these errors were encountered: