1
Fork 0

simplify more, ret_deref -> has_deref

This commit is contained in:
ouz-a 2022-05-16 16:23:42 +03:00
parent c0e4230bf5
commit c3e1e7a947
3 changed files with 9 additions and 11 deletions

View file

@ -435,13 +435,12 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
LocalRef::Place(place) => place,
LocalRef::UnsizedPlace(place) => bx.load_operand(place).deref(cx),
LocalRef::Operand(..) => {
if place_ref.ret_deref().is_some() {
if place_ref.has_deref() {
base = 1;
let cg_base = self.codegen_consume(
bx,
mir::PlaceRef { projection: &place_ref.projection[..0], ..place_ref },
);
cg_base.deref(bx.cx())
} else {
bug!("using operand local {:?} as place", place_ref);