Closed
Description
Code
I tried this code:
#![deny(unreachable_pub)]
pub use crate::builder::Foo;
mod builder {
pub struct Foo(pub(crate) ());
}
I expected to see no output from the compiler.
Instead, this happened:
djc-2021 main test-rs $ cargo +nightly c
Checking test-rs v0.1.0 (/Users/djc/src/test-rs)
error: unreachable `pub` item
--> src/lib.rs:3:9
|
3 | pub use crate::builder::Foo;
| --- ^^^^^^^^^^^^^^^^^^^
| |
| help: consider restricting its visibility: `pub(crate)`
|
cargo-bisect-rustc ouptut
searched nightlies: from nightly-2022-09-22 to nightly-2022-09-27
regressed nightly: nightly-2022-09-25
searched commit range: 4a14677...3f83906
regressed commit: 6580010
This is a roll-up, #102109 seems the most likely culprit. cc @petrochenkov @oli-obk
bisected with cargo-bisect-rustc v0.6.4
Host triple: aarch64-apple-darwin
Reproduce with:
cargo bisect-rustc --start=2022-09-22
@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged