Skip to content

Commit d536c18

Browse files
committed
Address comments, and refer to the issue the same way existing code does
1 parent 9ee234e commit d536c18

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

compiler/rustc_passes/src/stability.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! A pass that annotates every item and method with its stability level,
22
//! propagating default levels lexically from parent to children ast nodes.
33
4-
use hir::ItemKind;
54
use rustc_attr::{self as attr, ConstStability, Stability};
65
use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
76
use rustc_errors::struct_span_err;
@@ -10,7 +9,7 @@ use rustc_hir::def::{DefKind, Res};
109
use rustc_hir::def_id::{LocalDefId, CRATE_DEF_ID};
1110
use rustc_hir::hir_id::CRATE_HIR_ID;
1211
use rustc_hir::intravisit::{self, Visitor};
13-
use rustc_hir::{FieldDef, Generics, HirId, Item, TraitRef, Ty, TyKind, Variant};
12+
use rustc_hir::{FieldDef, Generics, HirId, Item, ItemKind, TraitRef, Ty, TyKind, Variant};
1413
use rustc_middle::hir::nested_filter;
1514
use rustc_middle::middle::privacy::AccessLevels;
1615
use rustc_middle::middle::stability::{AllowUnstable, DeprecationEntry, Index};
@@ -825,6 +824,8 @@ impl<'tcx> Visitor<'tcx> for Checker<'tcx> {
825824
}
826825

827826
/// Check whether a path is a `use` item that has been marked as unstable.
827+
///
828+
/// See issue #94972 for details on why this is a special case
828829
fn is_unstable_reexport<'tcx>(tcx: TyCtxt<'tcx>, id: hir::HirId) -> bool {
829830
// Get the LocalDefId so we can lookup the item to check the kind.
830831
let Some(def_id) = tcx.hir().opt_local_def_id(id) else { return false};

src/test/ui/stability-attribute/allow-unstable-reexport.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// Allow an unstable re-export without requiring a feature gate. https://github.com/rust-lang/rust/issues/94972
1+
// Allow an unstable re-export without requiring a feature gate.
2+
// #94972
23

34
// aux-build:lint-stability.rs
45
// aux-build:lint-stability-reexport.rs

0 commit comments

Comments
 (0)