- for attr in &item.attrs {
- let attr_item = if let AttrKind::Normal(ref attr, _) = attr.kind {
- attr
- } else {
- return;
- };
-
- if attr.style == AttrStyle::Outer {
- if attr_item.args.inner_tokens().is_empty() || !is_present_in_source(cx, attr.span) {
- return;
- }
-
+ let mut iter = item.attrs.iter().peekable();
+ while let Some(attr) = iter.next() {
+ if matches!(attr.kind, AttrKind::Normal(..))
+ && attr.style == AttrStyle::Outer
+ && is_present_in_source(cx, attr.span)
+ {