Skip to content

Commit cc0804e

Browse files
committed
Rustup to rustc 1.36.0-nightly (33fe1131c 2019-04-20)
1 parent 5d3fbdd commit cc0804e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/base.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use rustc::ty::adjustment::PointerCast;
2+
13
use crate::prelude::*;
24

35
struct PrintOnPanic<F: Fn() -> String>(F);
@@ -530,7 +532,7 @@ fn trans_stmt<'a, 'tcx: 'a>(
530532
};
531533
lval.write_cvalue(fx, CValue::ByVal(res, layout));
532534
}
533-
Rvalue::Cast(CastKind::ReifyFnPointer, operand, ty) => {
535+
Rvalue::Cast(CastKind::Pointer(PointerCast::ReifyFnPointer), operand, ty) => {
534536
let layout = fx.layout_of(ty);
535537
match fx
536538
.monomorphize(&operand.ty(&fx.mir.local_decls, fx.tcx))
@@ -547,8 +549,8 @@ fn trans_stmt<'a, 'tcx: 'a>(
547549
_ => bug!("Trying to ReifyFnPointer on non FnDef {:?}", ty),
548550
}
549551
}
550-
Rvalue::Cast(CastKind::UnsafeFnPointer, operand, ty)
551-
| Rvalue::Cast(CastKind::MutToConstPointer, operand, ty) => {
552+
Rvalue::Cast(CastKind::Pointer(PointerCast::UnsafeFnPointer), operand, ty)
553+
| Rvalue::Cast(CastKind::Pointer(PointerCast::MutToConstPointer), operand, ty) => {
552554
let operand = trans_operand(fx, operand);
553555
let layout = fx.layout_of(ty);
554556
lval.write_cvalue(fx, operand.unchecked_cast_to(layout));
@@ -644,7 +646,7 @@ fn trans_stmt<'a, 'tcx: 'a>(
644646
lval.write_cvalue(fx, CValue::ByVal(res, dest_layout));
645647
}
646648
}
647-
Rvalue::Cast(CastKind::ClosureFnPointer(_), operand, _ty) => {
649+
Rvalue::Cast(CastKind::Pointer(PointerCast::ClosureFnPointer(_)), operand, _ty) => {
648650
let operand = trans_operand(fx, operand);
649651
match operand.layout().ty.sty {
650652
ty::Closure(def_id, substs) => {
@@ -663,7 +665,7 @@ fn trans_stmt<'a, 'tcx: 'a>(
663665
}
664666
}
665667
}
666-
Rvalue::Cast(CastKind::Unsize, operand, _ty) => {
668+
Rvalue::Cast(CastKind::Pointer(PointerCast::Unsize), operand, _ty) => {
667669
let operand = trans_operand(fx, operand);
668670
operand.unsize_value(fx, lval);
669671
}

0 commit comments

Comments
 (0)