@@ -6,7 +6,7 @@ use std::mem;
66use std:: num:: NonZero ;
77use std:: ops:: Deref ;
88
9- use rustc_attr_parsing :: { ConstStability , StabilityLevel } ;
9+ use rustc_attr_data_structures as attrs ;
1010use rustc_errors:: { Diag , ErrorGuaranteed } ;
1111use rustc_hir:: def:: DefKind ;
1212use rustc_hir:: def_id:: DefId ;
@@ -475,7 +475,7 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
475475 /// Check the const stability of the given item (fn or trait).
476476 fn check_callee_stability ( & mut self , def_id : DefId ) {
477477 match self . tcx . lookup_const_stability ( def_id) {
478- Some ( ConstStability { level : StabilityLevel :: Stable { .. } , .. } ) => {
478+ Some ( attrs :: ConstStability { level : attrs :: StabilityLevel :: Stable { .. } , .. } ) => {
479479 // All good.
480480 }
481481 None => {
@@ -491,8 +491,8 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
491491 } ) ;
492492 }
493493 }
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, .. } ,
496496 feature,
497497 ..
498498 } ) => {
@@ -918,8 +918,8 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
918918 } ) ;
919919 }
920920 }
921- Some ( ConstStability {
922- level : StabilityLevel :: Unstable { .. } ,
921+ Some ( attrs :: ConstStability {
922+ level : attrs :: StabilityLevel :: Unstable { .. } ,
923923 feature,
924924 ..
925925 } ) => {
@@ -930,7 +930,10 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
930930 suggestion : self . crate_inject_span ( ) ,
931931 } ) ;
932932 }
933- Some ( ConstStability { level : StabilityLevel :: Stable { .. } , .. } ) => {
933+ Some ( attrs:: ConstStability {
934+ level : attrs:: StabilityLevel :: Stable { .. } ,
935+ ..
936+ } ) => {
934937 // All good. Note that a `#[rustc_const_stable]` intrinsic (meaning it
935938 // can be *directly* invoked from stable const code) does not always
936939 // have the `#[rustc_intrinsic_const_stable_indirect]` attribute (which controls
0 commit comments