simplify more, ret_deref -> has_deref
This commit is contained in:
parent
c0e4230bf5
commit
c3e1e7a947
3 changed files with 9 additions and 11 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue