1
Fork 0

Remove constness from ImplSource::Param

This commit is contained in:
Deadbeef 2023-08-13 13:59:19 +00:00
parent 1702d0fffc
commit f441fa08da
29 changed files with 122 additions and 189 deletions

View file

@ -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

View file

@ -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