handle_auto_cfg_hide_show

Function handle_auto_cfg_hide_show 

Source
fn handle_auto_cfg_hide_show(
    tcx: TyCtxt<'_>,
    cfg_info: &mut CfgInfo,
    sub_attr: &MetaItemInner,
    is_show: bool,
    new_show_attrs: &mut FxHashMap<(Symbol, Option<Symbol>), Span>,
    new_hide_attrs: &mut FxHashMap<(Symbol, Option<Symbol>), Span>,
)
Expand description

This functions updates the hidden_cfg field of the provided cfg_info argument.

It also checks if a same cfg is present in both auto_cfg(hide(...)) and auto_cfg(show(...)) on the same item and emits an error if it’s the case.

Because we go through a list of cfgs, we keep track of the cfgs we saw in new_show_attrs and in new_hide_attrs arguments.