From 177b0d2f578353fe026c6fa4810bd9427e385a99 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Thu, 14 Nov 2019 21:13:40 +0100 Subject: [PATCH] Rustup to rustc 1.41.0-nightly (ded5ee001 2019-11-13) --- build_sysroot/Cargo.toml | 2 +- src/abi/mod.rs | 2 +- src/allocator.rs | 2 +- src/common.rs | 2 +- src/constant.rs | 10 +++++++--- src/value_and_place.rs | 8 ++++---- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/build_sysroot/Cargo.toml b/build_sysroot/Cargo.toml index f28a46245e8..2935a8bd3d3 100644 --- a/build_sysroot/Cargo.toml +++ b/build_sysroot/Cargo.toml @@ -5,7 +5,7 @@ version = "0.0.0" [dependencies] core = { path = "./sysroot_src/src/libcore" } -compiler_builtins = "0.1" +compiler_builtins = "=0.1.20" # FIXME use "0.1" once libstd has updated for the latest version alloc = { path = "./sysroot_src/src/liballoc" } std = { path = "./sysroot_src/src/libstd", features = ["panic_unwind", "backtrace"] } test = { path = "./sysroot_src/src/libtest" } diff --git a/src/abi/mod.rs b/src/abi/mod.rs index 881174646af..9e3e4f82a39 100644 --- a/src/abi/mod.rs +++ b/src/abi/mod.rs @@ -581,7 +581,7 @@ pub fn codegen_drop<'tcx>(fx: &mut FunctionCx<'_, 'tcx, impl Backend>, drop_plac &ty::RegionKind::ReErased, TypeAndMut { ty, - mutbl: crate::rustc::hir::Mutability::MutMutable, + mutbl: crate::rustc::hir::Mutability::Mutable, }, ), ); diff --git a/src/allocator.rs b/src/allocator.rs index 3be28e233ad..8031367b23b 100644 --- a/src/allocator.rs +++ b/src/allocator.rs @@ -20,7 +20,7 @@ pub fn codegen(tcx: TyCtxt<'_>, module: &mut Module) -> }); if any_dynamic_crate { false - } else if let Some(kind) = *tcx.sess.allocator_kind.get() { + } else if let Some(kind) = tcx.allocator_kind() { codegen_inner(tcx.sess, module, kind); true } else { diff --git a/src/common.rs b/src/common.rs index 838c8d3315b..1bd8afed508 100644 --- a/src/common.rs +++ b/src/common.rs @@ -72,7 +72,7 @@ pub fn clif_type_from_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> bool { - let ptr_ty = tcx.mk_ptr(TypeAndMut { ty, mutbl: rustc::hir::Mutability::MutImmutable }); + let ptr_ty = tcx.mk_ptr(TypeAndMut { ty, mutbl: rustc::hir::Mutability::Immutable }); match &tcx.layout_of(ParamEnv::reveal_all().and(ptr_ty)).unwrap().abi { Abi::Scalar(_) => false, Abi::ScalarPair(_, _) => true, diff --git a/src/constant.rs b/src/constant.rs index d366cf4bf88..6ccc4692947 100644 --- a/src/constant.rs +++ b/src/constant.rs @@ -6,6 +6,7 @@ use rustc::mir::interpret::{ use rustc::ty::{layout::Align, Const}; use rustc_mir::interpret::{ ImmTy, InterpCx, Machine, Memory, MemoryKind, OpTy, PlaceTy, Pointer, StackPopCleanup, + StackPopInfo, }; use cranelift_module::*; @@ -407,6 +408,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for TransPlaceInterpreter { _: &[OpTy<'tcx>], _: Option>, _: Option, + _: Option, ) -> InterpResult<'tcx, Option<&'mir Body<'tcx>>> { panic!(); } @@ -416,7 +418,9 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for TransPlaceInterpreter { _: Span, _: Instance<'tcx>, _: &[OpTy<'tcx>], - _: PlaceTy<'tcx>, + _: Option>, + _: Option, + _: Option, ) -> InterpResult<'tcx> { panic!(); } @@ -469,8 +473,8 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for TransPlaceInterpreter { Ok(()) } - fn stack_pop(_: &mut InterpCx<'mir, 'tcx, Self>, _: ()) -> InterpResult<'tcx> { - Ok(()) + fn stack_pop(_: &mut InterpCx<'mir, 'tcx, Self>, _: (), _: bool) -> InterpResult<'tcx, StackPopInfo> { + Ok(StackPopInfo::Normal) } } diff --git a/src/value_and_place.rs b/src/value_and_place.rs index c152b8d3c51..fcee67bfec6 100644 --- a/src/value_and_place.rs +++ b/src/value_and_place.rs @@ -351,14 +351,14 @@ impl<'tcx> CPlace<'tcx> { to_ty: Ty<'tcx>, ) { match (&from_ty.kind, &to_ty.kind) { - (ty::Ref(_, t, MutImmutable), ty::Ref(_, u, MutImmutable)) - | (ty::Ref(_, t, MutMutable), ty::Ref(_, u, MutImmutable)) - | (ty::Ref(_, t, MutMutable), ty::Ref(_, u, MutMutable)) => { + (ty::Ref(_, t, Immutable), ty::Ref(_, u, Immutable)) + | (ty::Ref(_, t, Mutable), ty::Ref(_, u, Immutable)) + | (ty::Ref(_, t, Mutable), ty::Ref(_, u, Mutable)) => { assert_assignable(fx, t, u); // &mut T -> &T is allowed // &'a T -> &'b T is allowed } - (ty::Ref(_, _, MutImmutable), ty::Ref(_, _, MutMutable)) => panic!( + (ty::Ref(_, _, Immutable), ty::Ref(_, _, Mutable)) => panic!( "Cant assign value of type {} to place of type {}", from_ty, to_ty ),