Skip to content

Commit

Permalink
Merge pull request #154 from dwrensha/update-rustc
Browse files Browse the repository at this point in the history
partially update for latest rustc nightly
  • Loading branch information
solson authored Mar 21, 2017
2 parents a82924b + 3612d82 commit c2db272
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bin/miri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fn after_analysis<'a, 'tcx>(state: &mut CompileState<'a, 'tcx>) {
impl<'a, 'tcx: 'a, 'hir> itemlikevisit::ItemLikeVisitor<'hir> for Visitor<'a, 'tcx> {
fn visit_item(&mut self, i: &'hir hir::Item) {
if let hir::Item_::ItemFn(_, _, _, _, _, body_id) = i.node {
if i.attrs.iter().any(|attr| attr.value.name == "test") {
if i.attrs.iter().any(|attr| attr.name().map_or(false, |n| n == "test")) {
let did = self.1.hir.body_owner_def_id(body_id);
println!("running test: {}", self.1.hir.def_path(did).to_string(self.1));
miri::eval_main(self.1, did, self.0);
Expand Down Expand Up @@ -117,8 +117,8 @@ fn resource_limits_from_attributes(state: &CompileState) -> miri::ResourceLimits
}
};

for attr in krate.attrs.iter().filter(|a| a.name() == "miri") {
if let MetaItemKind::List(ref items) = attr.value.node {
for attr in krate.attrs.iter().filter(|a| a.name().map_or(false, |n| n == "miri")) {
if let Some(items) = attr.meta_item_list() {
for item in items {
if let NestedMetaItemKind::MetaItem(ref inner) = item.node {
if let MetaItemKind::NameValue(ref value) = inner.node {
Expand Down

0 comments on commit c2db272

Please sign in to comment.