Rustup to rustc 1.41.0-nightly (ded5ee001 2019-11-13)
This commit is contained in:
parent
ff7507e014
commit
177b0d2f57
@ -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" }
|
||||
|
@ -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,
|
||||
},
|
||||
),
|
||||
);
|
||||
|
@ -20,7 +20,7 @@ pub fn codegen(tcx: TyCtxt<'_>, module: &mut Module<impl Backend + 'static>) ->
|
||||
});
|
||||
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 {
|
||||
|
@ -72,7 +72,7 @@ pub fn clif_type_from_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<types:
|
||||
|
||||
/// Is a pointer to this type a fat ptr?
|
||||
pub fn has_ptr_meta<'tcx>(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,
|
||||
|
@ -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<PlaceTy<'tcx>>,
|
||||
_: Option<BasicBlock>,
|
||||
_: Option<BasicBlock>,
|
||||
) -> 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<PlaceTy<'tcx>>,
|
||||
_: Option<BasicBlock>,
|
||||
_: Option<BasicBlock>,
|
||||
) -> 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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user