diff options
| author | ash <ashkernel02@gmail.com> | 2025-09-15 13:55:20 -0600 |
|---|---|---|
| committer | ash <ashkernel02@gmail.com> | 2025-09-15 13:55:20 -0600 |
| commit | fa7e474f9ca755ac102debcf6cd0ce77313ee0bf (patch) | |
| tree | bffdf4e8bb76094627ccdffc0d60d4cc660abf9c /compiler/rustc_middle/src | |
| parent | f3fd3efe4f698ad9dc2ccd6b46a3b07e1bc911da (diff) | |
| download | rust-fa7e474f9ca755ac102debcf6cd0ce77313ee0bf.tar.gz rust-fa7e474f9ca755ac102debcf6cd0ce77313ee0bf.zip | |
remove FIXME from `has_significant_drop`, replaced with checking non_region_infer
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/util.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs index 029586a9c55..b79b67c5927 100644 --- a/compiler/rustc_middle/src/ty/util.rs +++ b/compiler/rustc_middle/src/ty/util.rs @@ -1359,6 +1359,7 @@ impl<'tcx> Ty<'tcx> { /// 2229 drop reorder migration analysis. #[inline] pub fn has_significant_drop(self, tcx: TyCtxt<'tcx>, typing_env: ty::TypingEnv<'tcx>) -> bool { + assert!(!self.has_non_region_infer()); // Avoid querying in simple cases. match needs_drop_components(tcx, self) { Err(AlwaysRequiresDrop) => true, @@ -1371,14 +1372,6 @@ impl<'tcx> Ty<'tcx> { _ => self, }; - // FIXME(#86868): We should be canonicalizing, or else moving this to a method of inference - // context, or *something* like that, but for now just avoid passing inference - // variables to queries that can't cope with them. Instead, conservatively - // return "true" (may change drop order). - if query_ty.has_infer() { - return true; - } - // This doesn't depend on regions, so try to minimize distinct // query keys used. let erased = tcx.normalize_erasing_regions(typing_env, query_ty); |
