From f441fa08dac38a5a6ae471612543d7bf0097bffe Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Sun, 13 Aug 2023 13:59:19 +0000 Subject: Remove constness from `ImplSource::Param` --- compiler/rustc_const_eval/src/transform/check_consts/check.rs | 2 +- compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'compiler/rustc_const_eval') diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs index b077c10907e..fae047bff9e 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs @@ -772,7 +772,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> { }; match implsrc { - Ok(Some(ImplSource::Param(ty::BoundConstness::ConstIfConst, _))) => { + Ok(Some(ImplSource::Param(_))) if tcx.features().effects => { debug!( "const_trait_impl: provided {:?} via where-clause in {:?}", trait_ref, param_env diff --git a/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs b/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs index 8293bdfd969..b1b2859ef9d 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs @@ -174,8 +174,7 @@ impl Qualif for NeedsNonConstDrop { if !matches!( impl_src, - ImplSource::Builtin(BuiltinImplSource::Misc, _) - | ImplSource::Param(ty::BoundConstness::ConstIfConst, _) + ImplSource::Builtin(BuiltinImplSource::Misc, _) | ImplSource::Param(_) ) { // If our const destruct candidate is not ConstDestruct or implied by the param env, // then it's bad -- cgit 1.4.1-3-g733a5