1
1
//! A pass that annotates every item and method with its stability level,
2
2
//! propagating default levels lexically from parent to children ast nodes.
3
3
4
- use hir:: ItemKind ;
5
4
use rustc_attr:: { self as attr, ConstStability , Stability } ;
6
5
use rustc_data_structures:: fx:: { FxHashSet , FxIndexMap } ;
7
6
use rustc_errors:: struct_span_err;
@@ -10,7 +9,7 @@ use rustc_hir::def::{DefKind, Res};
10
9
use rustc_hir:: def_id:: { LocalDefId , CRATE_DEF_ID } ;
11
10
use rustc_hir:: hir_id:: CRATE_HIR_ID ;
12
11
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 } ;
14
13
use rustc_middle:: hir:: nested_filter;
15
14
use rustc_middle:: middle:: privacy:: AccessLevels ;
16
15
use rustc_middle:: middle:: stability:: { AllowUnstable , DeprecationEntry , Index } ;
@@ -825,6 +824,8 @@ impl<'tcx> Visitor<'tcx> for Checker<'tcx> {
825
824
}
826
825
827
826
/// 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
828
829
fn is_unstable_reexport < ' tcx > ( tcx : TyCtxt < ' tcx > , id : hir:: HirId ) -> bool {
829
830
// Get the LocalDefId so we can lookup the item to check the kind.
830
831
let Some ( def_id) = tcx. hir ( ) . opt_local_def_id ( id) else { return false } ;
0 commit comments