diff options
| author | bors <bors@rust-lang.org> | 2015-08-06 10:46:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-08-06 10:46:26 +0000 |
| commit | 8f3901feabf6c9072e533ae69b14b5761909f642 (patch) | |
| tree | fe5c317f4beac78bc43cb020894e69e327adde49 | |
| parent | 859d2954ed974e4d81ea4c20140f6f15f4c6077e (diff) | |
| parent | 38d627fe480c92e6123cff7c2f050b1943c89d64 (diff) | |
| download | rust-8f3901feabf6c9072e533ae69b14b5761909f642.tar.gz rust-8f3901feabf6c9072e533ae69b14b5761909f642.zip | |
Auto merge of #27555 - dotdash:drop_flag_ty, r=pnkfelix
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.
| -rw-r--r-- | src/librustc_trans/trans/base.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/librustc_trans/trans/base.rs b/src/librustc_trans/trans/base.rs index adc678f2c0e..7d2185f03fe 100644 --- a/src/librustc_trans/trans/base.rs +++ b/src/librustc_trans/trans/base.rs @@ -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 { |
