You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiling cargo v0.34.0 (/home/matthias/vcs/github/cargo)
warning: failed to automatically apply fixes suggested by rustc to crate `cargo`
after fixes were automatically applied the compiler reported errors within these files:
* src/cargo/core/compiler/context/mod.rs
* src/cargo/core/compiler/mod.rs
* src/cargo/core/resolver/context.rs
* src/cargo/util/mod.rs
This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/cargo/issues
quoting the full output of this command we'd be very appreciative!
warning: unreachable `pub` item
--> src/cargo/macros.rs:43:1
|
43 | pub struct DisplayAsDebug<T>(pub T);
| ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| help: consider restricting its visibility: `pub(crate)`
|
= note: requested on the command line with `-W unreachable-pub`
= help: or consider exporting it for use by other crates
It looks like the unreachable_pub lint is a little flaky. It looks like there were some attempts to improve it (rust-lang/rust#51866), but there are still some bad suggestions. I think it is mostly having problems with re-exports.
Here's one problem
#![warn(unreachable_pub)]pubuseself::m::f;mod m {pubuseself::imp::f;// Recommends pub(crate), but that causes an error above.mod imp {pubfnf(){}}}
And another one where it interacts poorly with unused_imports, which is harder to reduce:
#![warn(unreachable_pub)]#![deny(unused_imports)]pubmod core {pubmod compiler {mod context {mod compilation_files {pubstructMetadata;pubstructCompilationFiles;implCompilationFiles{pubfnmetadata() -> Metadata{Metadata}}}useself::compilation_files::CompilationFiles;pubuseself::compilation_files::Metadata;// Suggests pub(crate)// but that causes unused_imports to complain.pubstructContext;implContext{pubfnfiles() -> CompilationFiles{CompilationFiles}}}pubuseself::context::Context;}}
(followed my a lot more warnings).
The text was updated successfully, but these errors were encountered: