diff options
| author | Jane Lusby <jlusby@yaah.dev> | 2022-05-07 11:08:31 -0700 |
|---|---|---|
| committer | Jane Losare-Lusby <jlusby@yaah.dev> | 2022-07-08 21:18:15 +0000 |
| commit | 67fe8423a358e03a661d2c18e643572db4e00157 (patch) | |
| tree | 6ed2eda856d6f0b9416e3c9fad266709e440552e | |
| parent | d68cb1f9a3b7c066332d9f86f2a6884badce6e4b (diff) | |
| download | rust-67fe8423a358e03a661d2c18e643572db4e00157.tar.gz rust-67fe8423a358e03a661d2c18e643572db4e00157.zip | |
update comment
| -rw-r--r-- | compiler/rustc_passes/src/stability.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs index df6051bb59a..30f34d96f12 100644 --- a/compiler/rustc_passes/src/stability.rs +++ b/compiler/rustc_passes/src/stability.rs @@ -820,7 +820,10 @@ impl<'tcx> Visitor<'tcx> for Checker<'tcx> { ); if item_is_allowed { - // Check parent modules stability as well + // Check parent modules stability as well if the item the path refers to is itself + // stable. We only emit warnings for unstable path segments if the item is stable + // because stability is often inherited, so the most common case is that both the + // segments and the item are unstable behind the same feature flag. // // We check here rather than in `visit_path_segment` to prevent visiting the last // path segment twice |
