Skip to content

Commit c2db272

Browse files
authored
Merge pull request rust-lang#154 from dwrensha/update-rustc
partially update for latest rustc nightly
2 parents a82924b + 3612d82 commit c2db272

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bin/miri.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fn after_analysis<'a, 'tcx>(state: &mut CompileState<'a, 'tcx>) {
8282
impl<'a, 'tcx: 'a, 'hir> itemlikevisit::ItemLikeVisitor<'hir> for Visitor<'a, 'tcx> {
8383
fn visit_item(&mut self, i: &'hir hir::Item) {
8484
if let hir::Item_::ItemFn(_, _, _, _, _, body_id) = i.node {
85-
if i.attrs.iter().any(|attr| attr.value.name == "test") {
85+
if i.attrs.iter().any(|attr| attr.name().map_or(false, |n| n == "test")) {
8686
let did = self.1.hir.body_owner_def_id(body_id);
8787
println!("running test: {}", self.1.hir.def_path(did).to_string(self.1));
8888
miri::eval_main(self.1, did, self.0);
@@ -117,8 +117,8 @@ fn resource_limits_from_attributes(state: &CompileState) -> miri::ResourceLimits
117117
}
118118
};
119119

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

0 commit comments

Comments
 (0)