Skip to content

Commit

Permalink
Fix checking structs with #[derive]
Browse files Browse the repository at this point in the history
Closes #26
  • Loading branch information
alexcrichton committed Feb 1, 2018
1 parent 29d33e2 commit b590c29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1506,9 +1506,12 @@ impl<'a> Resolver for MyResolver<'a> {
fn resolve_imports(&mut self) {
}

fn find_legacy_attr_invoc(&mut self, _attrs: &mut Vec<Attribute>)
fn find_legacy_attr_invoc(&mut self, attrs: &mut Vec<Attribute>)
-> Option<Attribute>
{
attrs.retain(|a| {
!a.check_name("derive")
});
None
}

Expand Down
1 change: 1 addition & 0 deletions testcrate/src/t2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ macro_rules! i {
}

#[repr(C)]
#[derive(Debug)]
pub struct T2Baz {
pub a: i64,
pub b: u32,
Expand Down

0 comments on commit b590c29

Please sign in to comment.