Skip to content

Commit

Permalink
Use TypingEnv from MIR builder
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Dec 19, 2024
1 parent c434b4b commit 1f352ac
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions compiler/rustc_mir_build/src/builder/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1119,10 +1119,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
region_scope: region::Scope,
local: Local,
) {
if !self.local_decls[local].ty.has_significant_drop(self.tcx, ty::TypingEnv {
typing_mode: ty::TypingMode::non_body_analysis(),
param_env: self.param_env,
}) {
if !self.local_decls[local].ty.has_significant_drop(self.tcx, self.typing_env()) {
return;
}
for scope in self.scopes.scopes.iter_mut().rev() {
Expand Down

0 comments on commit 1f352ac

Please sign in to comment.