Rustup to rustc 1.32.0-nightly (653da4fd0 2018-11-08)

This commit is contained in:
bjorn3 2018-11-09 17:54:28 +01:00
parent 85d0c1f487
commit 7d602513b1
3 changed files with 16 additions and 27 deletions

View File

@ -5,7 +5,7 @@ use rustc::mir::interpret::{
};
use rustc::ty::Const;
use rustc_mir::interpret::{
EvalContext, Machine, MemPlace, Memory, MemoryKind, OpTy, PlaceTy, Pointer,
EvalContext, MPlaceTy, Machine, Memory, MemoryKind, OpTy, PlaceTy, Pointer,
};
use cranelift_module::*;
@ -160,13 +160,12 @@ fn data_id_for_static<'a, 'tcx: 'a, B: Backend>(
def_id: DefId,
) -> DataId {
let symbol_name = tcx.symbol_name(Instance::mono(tcx, def_id)).as_str();
let is_mutable =
if let crate::rustc::hir::Mutability::MutMutable = tcx.is_static(def_id).unwrap() {
true
} else {
!tcx.type_of(def_id)
.is_freeze(tcx, ParamEnv::reveal_all(), DUMMY_SP)
};
let is_mutable = if let ::rustc::hir::Mutability::MutMutable = tcx.is_static(def_id).unwrap() {
true
} else {
!tcx.type_of(def_id)
.is_freeze(tcx, ParamEnv::reveal_all(), DUMMY_SP)
};
module
.declare_data(&*symbol_name, Linkage::Export, is_mutable)
.unwrap()
@ -314,7 +313,7 @@ impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for TransPlaceInterpreter {
}
fn find_foreign_static(
_: crate::rustc::ty::query::TyCtxtAt<'a, 'tcx, 'tcx>,
_: ::rustc::ty::query::TyCtxtAt<'a, 'tcx, 'tcx>,
_: DefId,
) -> EvalResult<'tcx, Cow<'tcx, Allocation>> {
panic!();
@ -337,21 +336,17 @@ impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for TransPlaceInterpreter {
fn tag_reference(
_: &mut EvalContext<'a, 'mir, 'tcx, Self>,
_: MemPlace,
_: Ty<'tcx>,
_: Size,
_: Option<crate::rustc::hir::Mutability>,
) -> EvalResult<'tcx, MemPlace> {
_: MPlaceTy<'tcx>,
_: Option<::rustc::hir::Mutability>,
) -> EvalResult<'tcx, Scalar> {
panic!()
}
fn tag_dereference(
_: &EvalContext<'a, 'mir, 'tcx, Self>,
_: MemPlace,
_: Ty<'tcx>,
_: Size,
_: Option<crate::rustc::hir::Mutability>,
) -> EvalResult<'tcx, MemPlace> {
_: MPlaceTy<'tcx>,
_: Option<::rustc::hir::Mutability>,
) -> EvalResult<'tcx, Scalar> {
panic!();
}

View File

@ -258,8 +258,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
.expect("Expected CraneliftCodegenBackend's CodegenResult, found Box<Any>");
for &crate_type in sess.opts.crate_types.iter() {
let output_name =
out_filename(sess, crate_type, &outputs, &res.crate_name.as_str());
let output_name = out_filename(sess, crate_type, &outputs, &res.crate_name.as_str());
match crate_type {
CrateType::Rlib => link::link_rlib(sess, &res, output_name),
CrateType::Executable => link::link_bin(sess, &res, output_name),

View File

@ -3,11 +3,7 @@ use std::path::PathBuf;
use rustc::session::Session;
pub(crate) fn link_rlib(
sess: &Session,
res: &crate::CodegenResult,
output_name: PathBuf,
) {
pub(crate) fn link_rlib(sess: &Session, res: &crate::CodegenResult, output_name: PathBuf) {
let file = File::create(&output_name).unwrap();
let mut builder = ar::Builder::new(file);
@ -52,7 +48,6 @@ pub(crate) fn link_bin(sess: &Session, res: &crate::CodegenResult, output_name:
std::fs::write(output_name, obj).unwrap();
}
/*
res.artifact
.declare_with(