diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2023-08-13 13:59:19 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2023-08-14 02:17:30 +0000 |
| commit | f441fa08dac38a5a6ae471612543d7bf0097bffe (patch) | |
| tree | 2d403b804b21c4309a4a860931401db83026a638 /compiler/rustc_const_eval/src | |
| parent | 1702d0fffc490e304cf93558c621f913ca062e62 (diff) | |
| download | rust-f441fa08dac38a5a6ae471612543d7bf0097bffe.tar.gz rust-f441fa08dac38a5a6ae471612543d7bf0097bffe.zip | |
Remove constness from `ImplSource::Param`
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/check_consts/check.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs | 3 |
2 files changed, 2 insertions, 3 deletions
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 |
