Skip to content

Commit

Permalink
w
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Nov 5, 2024
1 parent c122e71 commit c70c0f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_mir_build/src/build/expr/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {

// Generate better code for things that don't need to be
// dropped.
if lhs_expr.ty.needs_drop(this.tcx, ty::TypingEnv::from_param_env(this.param_env)) {
if lhs_expr.ty.needs_drop(this.tcx, this.infcx.typing_env(this.param_env)) {
let rhs = unpack!(block = this.as_local_rvalue(block, rhs));
let lhs = unpack!(block = this.as_place(block, lhs));
block =
Expand Down

0 comments on commit c70c0f1

Please sign in to comment.