From 9ddb4fd1215ff2fb8489e38e8368dbe9082a44d5 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 8 Aug 2020 10:27:23 +0200 Subject: [PATCH] rustup --- rust-version | 2 +- src/machine.rs | 3 +-- src/shims/foreign_items.rs | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/rust-version b/rust-version index 4fb52f22fa..75cd757fcc 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -1d69e3b1d753951bc7df0f02d6fd4719065d98c3 +c92fc8db8b009b7661cff31fa59a7c0348653bd0 diff --git a/src/machine.rs b/src/machine.rs index f9dd48fdba..9e22825cca 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -11,7 +11,6 @@ use std::fmt; use log::trace; use rand::rngs::StdRng; -use rustc_ast::attr; use rustc_data_structures::fx::FxHashMap; use rustc_middle::{ mir, @@ -442,7 +441,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> { def_id: DefId, ) -> InterpResult<'tcx, AllocId> { let attrs = memory.tcx.get_attrs(def_id); - let link_name = match attr::first_attr_value_str_by_name(&attrs, sym::link_name) { + let link_name = match memory.tcx.sess.first_attr_value_str_by_name(&attrs, sym::link_name) { Some(name) => name, None => memory.tcx.item_name(def_id), }; diff --git a/src/shims/foreign_items.rs b/src/shims/foreign_items.rs index 0379ec0c07..355801eb8f 100644 --- a/src/shims/foreign_items.rs +++ b/src/shims/foreign_items.rs @@ -7,7 +7,6 @@ use rustc_middle::{mir, ty}; use rustc_target::abi::{Align, Size}; use rustc_apfloat::Float; use rustc_span::symbol::sym; -use rustc_ast::attr; use crate::*; use helpers::check_arg_count; @@ -117,7 +116,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx ) -> InterpResult<'tcx, Option<&'mir mir::Body<'tcx>>> { let this = self.eval_context_mut(); let attrs = this.tcx.get_attrs(def_id); - let link_name = match attr::first_attr_value_str_by_name(&attrs, sym::link_name) { + let link_name = match this.tcx.sess.first_attr_value_str_by_name(&attrs, sym::link_name) { Some(name) => name.as_str(), None => this.tcx.item_name(def_id).as_str(), };