Skip to content

Commit 7794b03

Browse files
committed
fix(upstream): Rvalue::Use gains WithRetag
1 parent ad5f8b3 commit 7794b03

4 files changed

Lines changed: 14 additions & 15 deletions

File tree

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/atomic_context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ impl<'tcx> LateLintPass<'tcx> for AtomicContext<'tcx> {
349349
ItemKind::Struct(..) | ItemKind::Union(..) | ItemKind::Enum(..) => {
350350
(self.adt_callback)(i.item_id().owner_id.def_id);
351351
}
352-
ItemKind::Trait { .. } => {
352+
ItemKind::Trait { .. } => {
353353
// Not exactly an ADT, but we want to track drop_preempt_count on traits as well.
354354
(self.adt_callback)(i.item_id().owner_id.def_id);
355355
}

src/mir.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rustc_hir::{self as hir, def::DefKind};
1010
use rustc_middle::mir::CallSource;
1111
use rustc_middle::mir::{
1212
Body, ConstOperand, LocalDecl, Operand, Place, ProjectionElem, Rvalue, SourceInfo, Statement,
13-
StatementKind, TerminatorKind,
13+
StatementKind, TerminatorKind, WithRetag,
1414
};
1515
use rustc_middle::ty::{self, TyCtxt};
1616
use rustc_span::def_id::{CrateNum, DefId, DefIndex, LocalDefId};
@@ -74,7 +74,7 @@ fn remap_mir_for_const_eval_select<'tcx>(
7474
SourceInfo::outermost(fn_span),
7575
StatementKind::Assign(Box::new((
7676
local.into(),
77-
Rvalue::Use(tupled_args.node.clone()),
77+
Rvalue::Use(tupled_args.node.clone(), WithRetag::Yes),
7878
))),
7979
));
8080
(Operand::Move, local.into())

src/mir/elaborate_drop.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,10 @@ where
375375
let obj_ref_place = Place::from(self.new_temp(unwrap_ty));
376376
call_statements.push(self.assign(
377377
obj_ref_place,
378-
Rvalue::Use(Operand::Copy(tcx.mk_place_field(
379-
pin_obj_place,
380-
FieldIdx::ZERO,
381-
unwrap_ty,
382-
))),
378+
Rvalue::Use(
379+
Operand::Copy(tcx.mk_place_field(pin_obj_place, FieldIdx::ZERO, unwrap_ty)),
380+
WithRetag::Yes,
381+
),
383382
));
384383

385384
let obj_ptr_place = Place::from(self.new_temp(obj_ptr_ty));
@@ -1349,7 +1348,7 @@ where
13491348
Operand::Copy(Place::from(self.place.local)),
13501349
),
13511350
),
1352-
self.assign(cur.into(), Rvalue::Use(zero)),
1351+
self.assign(cur.into(), Rvalue::Use(zero, WithRetag::Yes)),
13531352
],
13541353
Some(Terminator {
13551354
source_info: self.source_info,

0 commit comments

Comments
 (0)