Skip to main content

Module propagate_doc_cfg

Module propagate_doc_cfg 

Source
Expand description

Propagates #[doc(cfg(โ€ฆ))] (RFC 3631) to child items.

Re-exportsยง

use rustc_attr_ir::Attribute; ๐Ÿ”’
use rustc_attr_ir::AttributeKind; ๐Ÿ”’
use rustc_attr_ir::DocAttribute; ๐Ÿ”’
use rustc_attr_ir::find_attr; ๐Ÿ”’
use rustc_data_structures::fx::FxHashMap; ๐Ÿ”’
use rustc_span::ExpnKind; ๐Ÿ”’
use rustc_span::MacroKind; ๐Ÿ”’
use crate::clean::inline::load_attrs; ๐Ÿ”’
use crate::clean::inline::merge_attrs; ๐Ÿ”’
use crate::clean::CfgInfo; ๐Ÿ”’
use crate::clean::Crate; ๐Ÿ”’
use crate::clean::Item; ๐Ÿ”’
use crate::clean::ItemId; ๐Ÿ”’
use crate::clean::ItemKind; ๐Ÿ”’
use crate::core::DocContext; ๐Ÿ”’
use crate::fold::DocFolder; ๐Ÿ”’

Structsยง

CfgPropagator ๐Ÿ”’

Functionsยง

add_cfg_state_attributes ๐Ÿ”’
This function goes through the attributes list (new_attrs) and extracts the attributes that affect the cfg state propagated to detached items.
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.
propagate_doc_cfg ๐Ÿ”’