Merge pull request #367 from bjorn3/rustup2

Rustup to rustc 1.27.0-nightly (79252ff4e 2018-04-29)
This commit is contained in:
Oliver Schneider 2018-05-01 11:11:45 +02:00 committed by GitHub
commit ee2a3a188e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View file

@ -2,9 +2,9 @@ use rustc::ty::{self, Ty};
use rustc::ty::layout::{self, Align, LayoutOf};
use rustc::hir::def_id::{DefId, CRATE_DEF_INDEX};
use rustc::mir;
use rustc_target::spec::abi::Abi;
use rustc_data_structures::indexed_vec::Idx;
use syntax::attr;
use syntax::abi::Abi;
use syntax::codemap::Span;
use std::mem;
@ -177,7 +177,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx> for EvalContext<'a, 'mir, '
let attrs = self.tcx.get_attrs(def_id);
let link_name = match attr::first_attr_value_str_by_name(&attrs, "link_name") {
Some(name) => name.as_str(),
None => self.tcx.item_name(def_id),
None => self.tcx.item_name(def_id).as_str(),
};
match &link_name[..] {

View file

@ -29,7 +29,7 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'mir, 'tcx, super:
) -> EvalResult<'tcx> {
let substs = instance.substs;
let intrinsic_name = &self.tcx.item_name(instance.def_id())[..];
let intrinsic_name = &self.tcx.item_name(instance.def_id()).as_str()[..];
match intrinsic_name {
"align_offset" => {
// FIXME: return a real value in case the target allocation has an

View file

@ -11,6 +11,7 @@ extern crate log;
#[macro_use]
extern crate rustc;
extern crate rustc_mir;
extern crate rustc_target;
extern crate rustc_data_structures;
extern crate syntax;
extern crate regex;

View file

@ -3,7 +3,7 @@ use rustc::hir::Mutability::*;
use rustc::mir::{self, ValidationOp, ValidationOperand};
use rustc::mir::interpret::GlobalId;
use rustc::ty::{self, Ty, TypeFoldable, TyCtxt, Instance};
use rustc::ty::layout::LayoutOf;
use rustc::ty::layout::{LayoutOf, PrimitiveExt};
use rustc::ty::subst::{Substs, Subst};
use rustc::traits::{self, TraitEngine};
use rustc::infer::InferCtxt;