Module propagate_doc_cfg

Module propagate_doc_cfg 

Source
Expand description

Propagates #[doc(cfg(...))] to child items.

StructsΒ§

CfgPropagator πŸ”’

ConstantsΒ§

PROPAGATE_DOC_CFG πŸ”’

FunctionsΒ§

add_only_cfg_attributes πŸ”’
This function goes through the attributes list (new_attrs) and extract the cfg tokens from it and put them into attrs.
filter_non_cfg_tokens_from_list πŸ”’
We only want to keep #[cfg()] and #[doc(cfg())] attributes so we rebuild a vec of TokenTree with only the tokens we’re interested into.
is_cfg_token πŸ”’
Returns true if the provided token is a cfg ident.
propagate_doc_cfg πŸ”’