11use crate :: { build, shim} ;
22use rustc_index:: vec:: IndexVec ;
33use rustc:: hir:: def_id:: { CrateNum , DefId , LOCAL_CRATE } ;
4- use rustc:: mir:: { Body , MirPhase , Promoted } ;
4+ use rustc:: mir:: { Body , MirPhase , Promoted , QualifSet } ;
55use rustc:: ty:: { TyCtxt , InstanceDef , TypeFoldable } ;
66use rustc:: ty:: query:: Providers ;
77use rustc:: ty:: steal:: Steal ;
@@ -184,12 +184,12 @@ pub fn run_passes(
184184 body. phase = mir_phase;
185185}
186186
187- fn mir_const_qualif ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> u8 {
187+ fn mir_const_qualif ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> QualifSet {
188188 let const_kind = check_consts:: ConstKind :: for_item ( tcx, def_id) ;
189189
190190 // No need to const-check a non-const `fn`.
191191 if const_kind. is_none ( ) {
192- return 0 ;
192+ return Default :: default ( ) ;
193193 }
194194
195195 // N.B., this `borrow()` is guaranteed to be valid (i.e., the value
@@ -200,7 +200,7 @@ fn mir_const_qualif(tcx: TyCtxt<'_>, def_id: DefId) -> u8 {
200200
201201 if body. return_ty ( ) . references_error ( ) {
202202 tcx. sess . delay_span_bug ( body. span , "mir_const_qualif: MIR had errors" ) ;
203- return 0 ;
203+ return Default :: default ( ) ;
204204 }
205205
206206 let item = check_consts:: Item {
0 commit comments