fn take_first_attr(
        &mut self,
        item: &mut impl HasAttrs,
    ) -> Option<(Option<ast::Attribute>, Vec<Path>, /* after_derive */ bool)> {
        let (mut attr, mut traits, mut after_derive) = (None, Vec::new(), false);

        item.visit_attrs(|mut attrs| {
            attr = self.find_attr_invoc(&mut attrs, &mut after_derive);
            traits = collect_derives(&mut self.cx, &mut attrs);
        });

        if attr.is_some() || !traits.is_empty() { Some((attr, traits, after_derive)) } else { None }
    }
/// If `item` is an attr invocation, remove and return the macro attribute and derive traits.
If `item` is an attr invocation, remove and return the macro attribute and derive traits.
If ` item ` is an attr invocation remove and return the macro attribute and derive traits .
fn take_first_attr(
        &mut self,
        item: &mut impl HasAttrs,
    ) -> Option<(Option<ast::Attribute>, Vec<Path>, /* after_derive */ bool)> {
        let (mut attr, mut traits, mut after_derive) = (None, Vec::new(), false);
        item.visit_attrs(|mut attrs| {
            attr = self.find_attr_invoc(&mut attrs, &mut after_derive);
            traits = collect_derives(&mut self.cx, &mut attrs);
        });
        if attr.is_some() || !traits.is_empty() { Some((attr, traits, after_derive)) } else { None }
    }
fn take_first_attr ( & mut self , item : & mut impl HasAttrs , ) -> Option < ( Option < ast :: Attribute > , Vec < Path > , /* after_derive */ bool ) > { let ( mut attr , mut traits , mut after_derive ) = ( None , Vec :: new ( ) , false ) ; item . visit_attrs ( | mut attrs | { attr = self . find_attr_invoc ( & mut attrs , & mut after_derive ) ; traits = collect_derives ( & mut self . cx , & mut attrs ) ; } ) ; if attr . is_some ( ) || ! traits . is_empty ( ) { Some ( ( attr , traits , after_derive ) ) } else { None } }
If `item` is an attr invocation, remove and return the macro attribute and derive traits.
If ` item ` is an attr invocation remove and return the macro attribute and derive traits .
&mut self
item
&mut impl HasAttrs
&mut self
item
&mut impl HasAttrs