Rustup to rustc 1.32.0-nightly (e6c5cf923
2018-11-04)
This commit is contained in:
parent
4f7f65ce55
commit
438bee5fb1
3 changed files with 11 additions and 11 deletions
|
@ -456,7 +456,7 @@ pub fn codegen_terminator_call<'a, 'tcx: 'a>(
|
||||||
args: &[Operand<'tcx>],
|
args: &[Operand<'tcx>],
|
||||||
destination: &Option<(Place<'tcx>, BasicBlock)>,
|
destination: &Option<(Place<'tcx>, BasicBlock)>,
|
||||||
) {
|
) {
|
||||||
let fn_ty = fx.monomorphize(&func.ty(&fx.mir.local_decls, fx.tcx));
|
let fn_ty = fx.monomorphize(&func.ty(fx.mir, fx.tcx));
|
||||||
let sig = ty_fn_sig(fx.tcx, fn_ty);
|
let sig = ty_fn_sig(fx.tcx, fn_ty);
|
||||||
|
|
||||||
// Unpack arguments tuple for closures
|
// Unpack arguments tuple for closures
|
||||||
|
|
|
@ -402,7 +402,7 @@ fn trans_stmt<'a, 'tcx: 'a>(
|
||||||
place.write_place_ref(fx, lval);
|
place.write_place_ref(fx, lval);
|
||||||
}
|
}
|
||||||
Rvalue::BinaryOp(bin_op, lhs, rhs) => {
|
Rvalue::BinaryOp(bin_op, lhs, rhs) => {
|
||||||
let ty = fx.monomorphize(&lhs.ty(&fx.mir.local_decls, fx.tcx));
|
let ty = fx.monomorphize(&lhs.ty(fx.mir, fx.tcx));
|
||||||
let lhs = trans_operand(fx, lhs);
|
let lhs = trans_operand(fx, lhs);
|
||||||
let rhs = trans_operand(fx, rhs);
|
let rhs = trans_operand(fx, rhs);
|
||||||
|
|
||||||
|
@ -422,7 +422,7 @@ fn trans_stmt<'a, 'tcx: 'a>(
|
||||||
lval.write_cvalue(fx, res);
|
lval.write_cvalue(fx, res);
|
||||||
}
|
}
|
||||||
Rvalue::CheckedBinaryOp(bin_op, lhs, rhs) => {
|
Rvalue::CheckedBinaryOp(bin_op, lhs, rhs) => {
|
||||||
let ty = fx.monomorphize(&lhs.ty(&fx.mir.local_decls, fx.tcx));
|
let ty = fx.monomorphize(&lhs.ty(fx.mir, fx.tcx));
|
||||||
let lhs = trans_operand(fx, lhs);
|
let lhs = trans_operand(fx, lhs);
|
||||||
let rhs = trans_operand(fx, rhs);
|
let rhs = trans_operand(fx, rhs);
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ pub fn pointer_ty(tcx: TyCtxt) -> types::Type {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn scalar_to_cton_type(tcx: TyCtxt, scalar: &Scalar) -> Type {
|
fn scalar_to_cton_type(tcx: TyCtxt, scalar: &Scalar) -> Type {
|
||||||
match scalar.value.size(tcx).bits() {
|
match scalar.value.size(&tcx).bits() {
|
||||||
8 => types::I8,
|
8 => types::I8,
|
||||||
16 => types::I16,
|
16 => types::I16,
|
||||||
32 => types::I32,
|
32 => types::I32,
|
||||||
|
@ -530,7 +530,7 @@ impl<'a, 'tcx: 'a> CPlace<'tcx> {
|
||||||
scalar_to_cton_type(fx.tcx, b),
|
scalar_to_cton_type(fx.tcx, b),
|
||||||
MemFlags::new(),
|
MemFlags::new(),
|
||||||
addr,
|
addr,
|
||||||
a.value.size(fx.tcx).bytes() as u32 as i32,
|
a.value.size(&fx.tcx).bytes() as u32 as i32,
|
||||||
);
|
);
|
||||||
CPlace::Addr(ptr, Some(extra), inner_layout)
|
CPlace::Addr(ptr, Some(extra), inner_layout)
|
||||||
}
|
}
|
||||||
|
@ -558,7 +558,7 @@ impl<'a, 'tcx: 'a> CPlace<'tcx> {
|
||||||
MemFlags::new(),
|
MemFlags::new(),
|
||||||
extra.expect("unsized type without metadata"),
|
extra.expect("unsized type without metadata"),
|
||||||
dest.expect_addr(),
|
dest.expect_addr(),
|
||||||
a.value.size(fx.tcx).bytes() as u32 as i32,
|
a.value.size(&fx.tcx).bytes() as u32 as i32,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
_ => bug!(
|
_ => bug!(
|
||||||
|
@ -643,29 +643,29 @@ impl<'a, 'tcx: 'a, B: Backend + 'a> fmt::Debug for FunctionCx<'a, 'tcx, B> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx: 'a, B: Backend> LayoutOf for &'a FunctionCx<'a, 'tcx, B> {
|
impl<'a, 'tcx: 'a, B: Backend> LayoutOf for FunctionCx<'a, 'tcx, B> {
|
||||||
type Ty = Ty<'tcx>;
|
type Ty = Ty<'tcx>;
|
||||||
type TyLayout = TyLayout<'tcx>;
|
type TyLayout = TyLayout<'tcx>;
|
||||||
|
|
||||||
fn layout_of(self, ty: Ty<'tcx>) -> TyLayout<'tcx> {
|
fn layout_of(&self, ty: Ty<'tcx>) -> TyLayout<'tcx> {
|
||||||
let ty = self.monomorphize(&ty);
|
let ty = self.monomorphize(&ty);
|
||||||
self.tcx.layout_of(ParamEnv::reveal_all().and(&ty)).unwrap()
|
self.tcx.layout_of(ParamEnv::reveal_all().and(&ty)).unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx, B: Backend + 'a> layout::HasTyCtxt<'tcx> for &'a FunctionCx<'a, 'tcx, B> {
|
impl<'a, 'tcx, B: Backend + 'a> layout::HasTyCtxt<'tcx> for FunctionCx<'a, 'tcx, B> {
|
||||||
fn tcx<'b>(&'b self) -> TyCtxt<'b, 'tcx, 'tcx> {
|
fn tcx<'b>(&'b self) -> TyCtxt<'b, 'tcx, 'tcx> {
|
||||||
self.tcx
|
self.tcx
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx, B: Backend + 'a> layout::HasDataLayout for &'a FunctionCx<'a, 'tcx, B> {
|
impl<'a, 'tcx, B: Backend + 'a> layout::HasDataLayout for FunctionCx<'a, 'tcx, B> {
|
||||||
fn data_layout(&self) -> &layout::TargetDataLayout {
|
fn data_layout(&self) -> &layout::TargetDataLayout {
|
||||||
&self.tcx.data_layout
|
&self.tcx.data_layout
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx, B: Backend + 'a> HasTargetSpec for &'a FunctionCx<'a, 'tcx, B> {
|
impl<'a, 'tcx, B: Backend + 'a> HasTargetSpec for FunctionCx<'a, 'tcx, B> {
|
||||||
fn target_spec(&self) -> &Target {
|
fn target_spec(&self) -> &Target {
|
||||||
&self.tcx.sess.target.target
|
&self.tcx.sess.target.target
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue