Skip to content

Commit

Permalink
syn API breaking change (rust-lang#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnzlbg authored and alexcrichton committed Nov 11, 2017
1 parent 064d06a commit 4d7d2f1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions stdsimd-test/assert-instr-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ pub fn assert_instr(
.expect("expected #[assert_instr(instr, a = b, ...)]");
let item =
syn::parse::<syn::Item>(item).expect("must be attached to an item");
let func = match item.node {
syn::ItemKind::Fn(ref f) => f,
let func = match item {
syn::Item::Fn(ref f) => f,
_ => panic!("must be attached to a function"),
};

Expand Down Expand Up @@ -70,7 +70,8 @@ pub fn assert_instr(
}
};
}
let attrs = item.attrs

let attrs = func.attrs
.iter()
.filter(|attr| {
attr.path
Expand Down

0 comments on commit 4d7d2f1

Please sign in to comment.