parent
ca92695a2c
commit
c5a7fca527
@ -501,7 +501,7 @@ fn trans_stmt<'tcx>(
|
||||
assert!(lval
|
||||
.layout()
|
||||
.ty
|
||||
.is_sized(fx.tcx.at(DUMMY_SP), ParamEnv::reveal_all()));
|
||||
.is_sized(fx.tcx.at(stmt.source_info.span), ParamEnv::reveal_all()));
|
||||
let ty_size = fx.layout_of(fx.monomorphize(ty)).size.bytes();
|
||||
let val = CValue::const_val(fx, fx.tcx.types.usize, ty_size.into());
|
||||
lval.write_cvalue(fx, val);
|
||||
|
@ -1,5 +1,7 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
use syntax::source_map::DUMMY_SP;
|
||||
|
||||
use rustc::mir::interpret::{
|
||||
read_target_uint, AllocId, Allocation, ConstValue, GlobalAlloc, InterpResult, Scalar,
|
||||
};
|
||||
|
@ -64,7 +64,7 @@ mod prelude {
|
||||
pub use std::convert::{TryFrom, TryInto};
|
||||
|
||||
pub use syntax::ast::{FloatTy, IntTy, UintTy};
|
||||
pub use syntax::source_map::{Pos, Span, DUMMY_SP};
|
||||
pub use syntax::source_map::{Pos, Span};
|
||||
|
||||
pub use rustc::bug;
|
||||
pub use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
|
||||
|
Loading…
x
Reference in New Issue
Block a user