about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/util.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-08 13:43:12 +0000
committerbors <bors@rust-lang.org>2023-12-08 13:43:12 +0000
commitae612bedcbfc7098d1711eb35bc7ca994eb17a4c (patch)
tree0b12b3ef4f77f2ea11a0156981949583438216c0 /compiler/rustc_middle/src/ty/util.rs
parent5ea62560f294947e55b0cf895dae23fe3c41777c (diff)
parentefe8ae730f4030e544ac733bc20c0825c713e7d9 (diff)
downloadrust-ae612bedcbfc7098d1711eb35bc7ca994eb17a4c.tar.gz
rust-ae612bedcbfc7098d1711eb35bc7ca994eb17a4c.zip
Auto merge of #118689 - compiler-errors:const-drop, r=fee1-dead
Fix const drop checking

Fixes confirmation of `~const Destruct` and const drops.

r? fee1-dead
Diffstat (limited to 'compiler/rustc_middle/src/ty/util.rs')
-rw-r--r--compiler/rustc_middle/src/ty/util.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs
index 70252a4dc67..52c3529d2b4 100644
--- a/compiler/rustc_middle/src/ty/util.rs
+++ b/compiler/rustc_middle/src/ty/util.rs
@@ -781,9 +781,9 @@ impl<'tcx> TyCtxt<'tcx> {
     }
 
     pub fn expected_const_effect_param_for_body(self, def_id: LocalDefId) -> ty::Const<'tcx> {
-        // if the callee does have the param, we need to equate the param to some const
-        // value no matter whether the effects feature is enabled in the local crate,
-        // because inference will fail if we don't.
+        // FIXME(effects): This is suspicious and should probably not be done,
+        // especially now that we enforce host effects and then properly handle
+        // effect vars during fallback.
         let mut host_always_on =
             !self.features().effects || self.sess.opts.unstable_opts.unleash_the_miri_inside_of_you;