@@ -14,7 +14,7 @@ pub fn is_min_const_fn(tcx: TyCtxt<'tcx>, def_id: DefId, body: &'a Body<'tcx>) -
1414 // Prevent const trait methods from being annotated as `stable`.
1515 if tcx. features ( ) . staged_api {
1616 let hir_id = tcx. hir ( ) . local_def_id_to_hir_id ( def_id. expect_local ( ) ) ;
17- if crate :: const_eval:: is_parent_const_impl_raw ( tcx, hir_id) {
17+ if rustc_mir :: const_eval:: is_parent_const_impl_raw ( tcx, hir_id) {
1818 return Err ( ( body. span , "trait methods cannot be stable const fn" . into ( ) ) ) ;
1919 }
2020 }
@@ -32,13 +32,13 @@ pub fn is_min_const_fn(tcx: TyCtxt<'tcx>, def_id: DefId, body: &'a Body<'tcx>) -
3232 | ty:: PredicateAtom :: ConstEquate ( ..)
3333 | ty:: PredicateAtom :: TypeWellFormedFromEnv ( ..) => continue ,
3434 ty:: PredicateAtom :: ObjectSafe ( _) => {
35- bug ! ( "object safe predicate on function: {:#?}" , predicate)
35+ panic ! ( "object safe predicate on function: {:#?}" , predicate)
3636 }
3737 ty:: PredicateAtom :: ClosureKind ( ..) => {
38- bug ! ( "closure kind predicate on function: {:#?}" , predicate)
38+ panic ! ( "closure kind predicate on function: {:#?}" , predicate)
3939 }
4040 ty:: PredicateAtom :: Subtype ( _) => {
41- bug ! ( "subtype predicate on function: {:#?}" , predicate)
41+ panic ! ( "subtype predicate on function: {:#?}" , predicate)
4242 }
4343 ty:: PredicateAtom :: Trait ( pred, constness) => {
4444 if Some ( pred. def_id ( ) ) == tcx. lang_items ( ) . sized_trait ( ) {
@@ -343,7 +343,7 @@ fn feature_allowed(tcx: TyCtxt<'tcx>, def_id: DefId, feature_gate: Symbol) -> bo
343343
344344 // However, we cannot allow stable `const fn`s to use unstable features without an explicit
345345 // opt-in via `allow_internal_unstable`.
346- super :: check_consts:: allow_internal_unstable ( tcx, def_id, feature_gate)
346+ rustc_mir :: transform :: check_consts:: allow_internal_unstable ( tcx, def_id, feature_gate)
347347}
348348
349349/// Returns `true` if the given library feature gate is allowed within the function with the given `DefId`.
@@ -362,7 +362,7 @@ pub fn lib_feature_allowed(tcx: TyCtxt<'tcx>, def_id: DefId, feature_gate: Symbo
362362
363363 // However, we cannot allow stable `const fn`s to use unstable features without an explicit
364364 // opt-in via `allow_internal_unstable`.
365- super :: check_consts:: allow_internal_unstable ( tcx, def_id, feature_gate)
365+ rustc_mir :: transform :: check_consts:: allow_internal_unstable ( tcx, def_id, feature_gate)
366366}
367367
368368fn check_terminator (
@@ -407,8 +407,8 @@ fn check_terminator(
407407 if let ty:: FnDef ( fn_def_id, _) = * fn_ty. kind ( ) {
408408 // Allow unstable const if we opt in by using #[allow_internal_unstable]
409409 // on function or macro declaration.
410- if !crate :: const_eval:: is_min_const_fn ( tcx, fn_def_id)
411- && !crate :: const_eval:: is_unstable_const_fn ( tcx, fn_def_id)
410+ if !rustc_mir :: const_eval:: is_min_const_fn ( tcx, fn_def_id)
411+ && !rustc_mir :: const_eval:: is_unstable_const_fn ( tcx, fn_def_id)
412412 . map ( |feature| {
413413 span. allows_unstable ( feature)
414414 || lib_feature_allowed ( tcx, def_id, feature)
0 commit comments