switch allow_internal_unstable const fns to rustc_allow_const_fn_unstable

This commit is contained in:
Florian Warzecha
2020-10-21 20:54:20 +02:00
parent 3948b054dc
commit 05f4a9a42a
24 changed files with 81 additions and 39 deletions

View File

@@ -79,7 +79,7 @@ pub fn is_lang_panic_fn(tcx: TyCtxt<'tcx>, def_id: DefId) -> bool {
pub fn allow_internal_unstable(tcx: TyCtxt<'tcx>, def_id: DefId, feature_gate: Symbol) -> bool {
let attrs = tcx.get_attrs(def_id);
attr::allow_internal_unstable(&tcx.sess, attrs)
attr::rustc_allow_const_fn_unstable(&tcx.sess, attrs)
.map_or(false, |mut features| features.any(|name| name == feature_gate))
}