1
Fork 0

nightly feature tracking: get rid of the per-feature bool fields

This commit is contained in:
Ralf Jung 2024-10-09 09:01:57 +02:00
parent e1f3068995
commit ad3991d303
108 changed files with 299 additions and 331 deletions

View file

@ -611,7 +611,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
// the trait into the concrete method, and uses that for const stability
// checks.
// FIXME(effects) we might consider moving const stability checks to typeck as well.
if tcx.features().effects {
if tcx.features().effects() {
is_trait = true;
if let Ok(Some(instance)) =
@ -631,7 +631,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
args: fn_args,
span: *fn_span,
call_source,
feature: Some(if tcx.features().const_trait_impl {
feature: Some(if tcx.features().const_trait_impl() {
sym::effects
} else {
sym::const_trait_impl

View file

@ -61,7 +61,7 @@ impl<'mir, 'tcx> ConstCx<'mir, 'tcx> {
pub fn is_const_stable_const_fn(&self) -> bool {
self.const_kind == Some(hir::ConstContext::ConstFn)
&& self.tcx.features().staged_api
&& self.tcx.features().staged_api()
&& is_const_stable_const_fn(self.tcx, self.def_id().to_def_id())
}

View file

@ -24,7 +24,7 @@ pub fn checking_enabled(ccx: &ConstCx<'_, '_>) -> bool {
);
}
ccx.tcx.features().const_precise_live_drops
ccx.tcx.features().const_precise_live_drops()
}
/// Look for live drops in a const context.