@@ -6,7 +6,7 @@ use std::mem;
6
6
use std:: num:: NonZero ;
7
7
use std:: ops:: Deref ;
8
8
9
- use rustc_attr_parsing :: { ConstStability , StabilityLevel } ;
9
+ use rustc_attr_data_structures as attrs ;
10
10
use rustc_errors:: { Diag , ErrorGuaranteed } ;
11
11
use rustc_hir:: def:: DefKind ;
12
12
use rustc_hir:: def_id:: DefId ;
@@ -475,7 +475,7 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
475
475
/// Check the const stability of the given item (fn or trait).
476
476
fn check_callee_stability ( & mut self , def_id : DefId ) {
477
477
match self . tcx . lookup_const_stability ( def_id) {
478
- Some ( ConstStability { level : StabilityLevel :: Stable { .. } , .. } ) => {
478
+ Some ( attrs :: ConstStability { level : attrs :: StabilityLevel :: Stable { .. } , .. } ) => {
479
479
// All good.
480
480
}
481
481
None => {
@@ -491,8 +491,8 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
491
491
} ) ;
492
492
}
493
493
}
494
- Some ( ConstStability {
495
- level : StabilityLevel :: Unstable { implied_by : implied_feature, issue, .. } ,
494
+ Some ( attrs :: ConstStability {
495
+ level : attrs :: StabilityLevel :: Unstable { implied_by : implied_feature, issue, .. } ,
496
496
feature,
497
497
..
498
498
} ) => {
@@ -918,8 +918,8 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
918
918
} ) ;
919
919
}
920
920
}
921
- Some ( ConstStability {
922
- level : StabilityLevel :: Unstable { .. } ,
921
+ Some ( attrs :: ConstStability {
922
+ level : attrs :: StabilityLevel :: Unstable { .. } ,
923
923
feature,
924
924
..
925
925
} ) => {
@@ -930,7 +930,10 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
930
930
suggestion : self . crate_inject_span ( ) ,
931
931
} ) ;
932
932
}
933
- Some ( ConstStability { level : StabilityLevel :: Stable { .. } , .. } ) => {
933
+ Some ( attrs:: ConstStability {
934
+ level : attrs:: StabilityLevel :: Stable { .. } ,
935
+ ..
936
+ } ) => {
934
937
// All good. Note that a `#[rustc_const_stable]` intrinsic (meaning it
935
938
// can be *directly* invoked from stable const code) does not always
936
939
// have the `#[rustc_intrinsic_const_stable_indirect]` attribute (which controls
0 commit comments