Remove constness from ImplSource::Param
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user