@@ -23,7 +23,7 @@ use rustc_middle::middle::stability;
2323use rustc_middle:: ty:: fold:: TypeFolder ;
2424use rustc_middle:: ty:: subst:: InternalSubsts ;
2525use rustc_middle:: ty:: { self , AdtKind , Lift , Ty , TyCtxt } ;
26- use rustc_mir:: const_eval:: is_min_const_fn;
26+ use rustc_mir:: const_eval:: { is_min_const_fn, is_unstable_const_fn } ;
2727use rustc_span:: hygiene:: MacroKind ;
2828use rustc_span:: symbol:: { kw, sym, Ident , Symbol } ;
2929use rustc_span:: { self , Pos } ;
@@ -900,7 +900,7 @@ impl Clean<Item> for doctree::Function<'_> {
900900 enter_impl_trait ( cx, || ( self . generics . clean ( cx) , ( self . decl , self . body ) . clean ( cx) ) ) ;
901901
902902 let did = cx. tcx . hir ( ) . local_def_id ( self . id ) ;
903- let constness = if is_min_const_fn ( cx. tcx , did. to_def_id ( ) ) {
903+ let constness = if ! is_unstable_const_fn ( cx. tcx , did. to_def_id ( ) ) . is_some ( ) {
904904 hir:: Constness :: Const
905905 } else {
906906 hir:: Constness :: NotConst
@@ -1108,7 +1108,7 @@ impl Clean<Item> for hir::TraitItem<'_> {
11081108 hir:: TraitItemKind :: Fn ( ref sig, hir:: TraitFn :: Provided ( body) ) => {
11091109 let mut m = ( sig, & self . generics , body, None ) . clean ( cx) ;
11101110 if m. header . constness == hir:: Constness :: Const
1111- && ! is_min_const_fn ( cx. tcx , local_did. to_def_id ( ) )
1111+ && is_unstable_const_fn ( cx. tcx , local_did. to_def_id ( ) ) . is_some ( )
11121112 {
11131113 m. header . constness = hir:: Constness :: NotConst ;
11141114 }
@@ -1121,7 +1121,7 @@ impl Clean<Item> for hir::TraitItem<'_> {
11211121 let ( all_types, ret_types) = get_all_types ( & generics, & decl, cx) ;
11221122 let mut t = TyMethod { header : sig. header , decl, generics, all_types, ret_types } ;
11231123 if t. header . constness == hir:: Constness :: Const
1124- && ! is_min_const_fn ( cx. tcx , local_did. to_def_id ( ) )
1124+ && is_unstable_const_fn ( cx. tcx , local_did. to_def_id ( ) ) . is_some ( )
11251125 {
11261126 t. header . constness = hir:: Constness :: NotConst ;
11271127 }
@@ -1154,7 +1154,7 @@ impl Clean<Item> for hir::ImplItem<'_> {
11541154 hir:: ImplItemKind :: Fn ( ref sig, body) => {
11551155 let mut m = ( sig, & self . generics , body, Some ( self . defaultness ) ) . clean ( cx) ;
11561156 if m. header . constness == hir:: Constness :: Const
1157- && ! is_min_const_fn ( cx. tcx , local_did. to_def_id ( ) )
1157+ && is_unstable_const_fn ( cx. tcx , local_did. to_def_id ( ) ) . is_some ( )
11581158 {
11591159 m. header . constness = hir:: Constness :: NotConst ;
11601160 }
0 commit comments