Skip to main content

Module cfg

Module cfg 

Source
Expand description

The representation of a #[doc(cfg(...))] attribute.

Re-exportsยง

use std::str::FromStr; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use std::fmt; ๐Ÿ”’
use std::mem; ๐Ÿ”’
use std::ops; ๐Ÿ”’
use itertools::Either; ๐Ÿ”’
use rustc_attr_ir::AttributeKind; ๐Ÿ”’
use rustc_attr_ir::CfgEntry; ๐Ÿ”’
use rustc_attr_ir::CfgHideShow; ๐Ÿ”’
use rustc_attr_ir::DocCfgHideShow; ๐Ÿ”’
use rustc_attr_ir::DocCfgHideShowValue; ๐Ÿ”’
use rustc_attr_ir::HideOrShow; ๐Ÿ”’
use rustc_data_structures::fx::FxHashMap; ๐Ÿ”’
use rustc_data_structures::thin_vec::ThinVec; ๐Ÿ”’
use rustc_data_structures::thin_vec::thin_vec; ๐Ÿ”’
use rustc_middle::ty::TyCtxt; ๐Ÿ”’
use rustc_span::symbol::Symbol; ๐Ÿ”’
use rustc_span::symbol::sym; ๐Ÿ”’
use rustc_span::DUMMY_SP; ๐Ÿ”’
use rustc_span::Span; ๐Ÿ”’
use rustc_target::spec; ๐Ÿ”’
use crate::display::Joined as _; ๐Ÿ”’
use crate::display::MaybeDisplay; ๐Ÿ”’
use crate::display::Wrapped; ๐Ÿ”’
use crate::html::escape::Escape; ๐Ÿ”’

Structsยง

Cfg ๐Ÿ”’
CfgInfo ๐Ÿ”’
This type keeps track of (doc) cfg information as we go down the item tree.
Display ๐Ÿ”’
Pretty-print wrapper for a Cfg. Also indicates what form of rendering should be used.

Enumsยง

DocCfgHide ๐Ÿ”’
Format ๐Ÿ”’

Functionsยง

extract_cfg_from_attrs ๐Ÿ”’
handle_auto_cfg_hide_show ๐Ÿ”’
This functions updates the hidden_cfg field of the provided cfg_info argument.
human_readable_target_arch ๐Ÿ”’
human_readable_target_env ๐Ÿ”’
human_readable_target_os ๐Ÿ”’
is_any_cfg ๐Ÿ”’
Returns true if is [CfgEntry::Any], otherwise returns false.
is_simple_cfg ๐Ÿ”’
Whether the configuration consists of just Cfg or Not.
should_capitalize_first_letter ๐Ÿ”’
strip_hidden ๐Ÿ”’