Remove constness from ImplSource::Param
This commit is contained in:
parent
1702d0fffc
commit
f441fa08da
29 changed files with 122 additions and 189 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue