We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d68cb1f commit 67fe842Copy full SHA for 67fe842
compiler/rustc_passes/src/stability.rs
@@ -820,7 +820,10 @@ impl<'tcx> Visitor<'tcx> for Checker<'tcx> {
820
);
821
822
if item_is_allowed {
823
- // Check parent modules stability as well
+ // Check parent modules stability as well if the item the path refers to is itself
824
+ // stable. We only emit warnings for unstable path segments if the item is stable
825
+ // because stability is often inherited, so the most common case is that both the
826
+ // segments and the item are unstable behind the same feature flag.
827
//
828
// We check here rather than in `visit_path_segment` to prevent visiting the last
829
// path segment twice
0 commit comments