expand_cfg_attr

Function expand_cfg_attr 

Source
pub fn expand_cfg_attr<'a, BreakValue>(
    attrs: impl Iterator<Item = Attr>,
    cfg_options: impl FnMut() -> &'a CfgOptions,
    callback: impl FnMut(Meta, &SyntaxNode, TextRange, &Attr) -> ControlFlow<BreakValue>,
) -> Option<BreakValue>
Expand description

The callback is passed a desugared form of the attribute (Meta), a [SyntaxNode] fully containing it (note: it may not be the direct parent), the range within the [SyntaxNode] bounding the attribute, and the outermost ast::Attr. Note that one node may map to multiple Metas due to cfg_attr.