rustfmt_nightly::attr

Function take_while_with_pred

Source
fn take_while_with_pred<'a, P>(
    context: &RewriteContext<'_>,
    attrs: &'a [Attribute],
    pred: P,
) -> &'a [Attribute]
where P: Fn(&Attribute) -> bool,
Expand description

Returns the first group of attributes that fills the given predicate. We consider two doc comments are in different group if they are separated by normal comments.