Skip to content

Commit

Permalink
Auto merge of rust-lang#27555 - dotdash:drop_flag_ty, r=pnkfelix
Browse files Browse the repository at this point in the history
The drop flags are Lvalue (and thus ByRef) datums that hold a u8 value,
so their value type should be u8, not a pointer to u8.
  • Loading branch information
bors committed Aug 6, 2015
2 parents 859d295 + 38d627f commit 8f3901f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/librustc_trans/trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1299,12 +1299,11 @@ pub fn init_function<'a, 'tcx>(fcx: &'a FunctionContext<'a, 'tcx>,
let init_val = C_u8(fcx.ccx, adt::DTOR_NEEDED_HINT);
let llname = &format!("dropflag_hint_{}", id);
debug!("adding hint {}", llname);
let ptr = alloc_ty(entry_bcx, tcx.types.u8, llname);
let ty = tcx.types.u8;
let ptr = alloc_ty(entry_bcx, ty, llname);
Store(entry_bcx, init_val, ptr);
let ty = tcx.mk_ptr(ty::TypeAndMut { ty: tcx.types.u8, mutbl: ast::MutMutable });
let flag = datum::Lvalue::new_dropflag_hint("base::init_function");
let datum = datum::Datum::new(ptr, ty, flag);
datum
datum::Datum::new(ptr, ty, flag)
};

let (var, datum) = match info {
Expand Down

0 comments on commit 8f3901f

Please sign in to comment.