-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-visibilityArea: Visibility / privacyArea: Visibility / privacyC-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Milestone
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
AaronErhardt and taiki-e
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-visibilityArea: Visibility / privacyArea: Visibility / privacyC-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.