Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upcargo fix fails to apply all -Wunreachable-pub hints #6465
Comments
matthiaskrgr
added
the
C-bug
label
Dec 20, 2018
This comment has been minimized.
This comment has been minimized.
|
It looks like the Here's one problem #![warn(unreachable_pub)]
pub use self::m::f;
mod m {
pub use self::imp::f; // Recommends pub(crate), but that causes an error above.
mod imp {
pub fn f() {}
}
}And another one where it interacts poorly with #![warn(unreachable_pub)]
#![deny(unused_imports)]
pub mod core {
pub mod compiler {
mod context {
mod compilation_files {
pub struct Metadata;
pub struct CompilationFiles;
impl CompilationFiles {
pub fn metadata() -> Metadata { Metadata }
}
}
use self::compilation_files::CompilationFiles;
pub use self::compilation_files::Metadata; // Suggests pub(crate)
// but that causes unused_imports to complain.
pub struct Context;
impl Context {
pub fn files() -> CompilationFiles { CompilationFiles }
}
}
pub use self::context::Context;
}
} |
This was referenced Jan 7, 2019
This comment has been minimized.
This comment has been minimized.
|
I've opened rust-lang/rust#57410 and rust-lang/rust#57411 for this, so closing in favor of those. |
alexcrichton
closed this
Jan 7, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
matthiaskrgr commentedDec 20, 2018
(followed my a lot more warnings).