fn extra_info_tags(item: &clean::Item, parent: &clean::Item, tcx: TyCtxt<'_>) -> String {
    let mut tags = String::new();

    fn tag_html(class: &str, title: &str, contents: &str) -> String {
        format!(r#"<span class="stab {}" title="{}">{}</span>"#, class, Escape(title), contents)
    }

    // The trailing space after each tag is to space it properly against the rest of the docs.
    if let Some(depr) = &item.deprecation(tcx) {
        let mut message = "Deprecated";
        if !stability::deprecation_in_effect(
            depr.is_since_rustc_version,
            depr.since.map(|s| s.as_str()).as_deref(),
        ) {
            message = "Deprecation planned";
        }
        tags += &tag_html("deprecated", "", message);
    }

    // The "rustc_private" crates are permanently unstable so it makes no sense
    // to render "unstable" everywhere.
    if item
        .stability(tcx)
        .as_ref()
        .map(|s| s.level.is_unstable() && s.feature != sym::rustc_private)
        == Some(true)
    {
        tags += &tag_html("unstable", "", "Experimental");
    }

    let cfg = match (&item.cfg, parent.cfg.as_ref()) {
        (Some(cfg), Some(parent_cfg)) => cfg.simplify_with(parent_cfg),
        (cfg, _) => cfg.as_deref().cloned(),
    };

    debug!("Portability {:?} - {:?} = {:?}", item.cfg, parent.cfg, cfg);
    if let Some(ref cfg) = cfg {
        tags += &tag_html("portability", &cfg.render_long_plain(), &cfg.render_short_html());
    }

    tags
}
/// Render the stability, deprecation and portability tags that are displayed in the item's summary
/// at the module level.
Render the stability, deprecation and portability tags that are displayed in the item's summary
at the module level.
Render the stability deprecation and portability tags that are displayed in the item ' s summary at the module level .
fn extra_info_tags(item: &clean::Item, parent: &clean::Item, tcx: TyCtxt<'_>) -> String {
    let mut tags = String::new();
    fn tag_html(class: &str, title: &str, contents: &str) -> String {
        format!(r#"<span class="stab {}" title="{}">{}</span>"#, class, Escape(title), contents)
    }
    // The trailing space after each tag is to space it properly against the rest of the docs.
    if let Some(depr) = &item.deprecation(tcx) {
        let mut message = "Deprecated";
        if !stability::deprecation_in_effect(
            depr.is_since_rustc_version,
            depr.since.map(|s| s.as_str()).as_deref(),
        ) {
            message = "Deprecation planned";
        }
        tags += &tag_html("deprecated", "", message);
    }
    // The "rustc_private" crates are permanently unstable so it makes no sense
    // to render "unstable" everywhere.
    if item
        .stability(tcx)
        .as_ref()
        .map(|s| s.level.is_unstable() && s.feature != sym::rustc_private)
        == Some(true)
    {
        tags += &tag_html("unstable", "", "Experimental");
    }
    let cfg = match (&item.cfg, parent.cfg.as_ref()) {
        (Some(cfg), Some(parent_cfg)) => cfg.simplify_with(parent_cfg),
        (cfg, _) => cfg.as_deref().cloned(),
    };
    debug!("Portability {:?} - {:?} = {:?}", item.cfg, parent.cfg, cfg);
    if let Some(ref cfg) = cfg {
        tags += &tag_html("portability", &cfg.render_long_plain(), &cfg.render_short_html());
    }
    tags
}
fn extra_info_tags ( item : & clean :: Item , parent : & clean :: Item , tcx : TyCtxt < ' _ > ) -> String { let mut tags = String :: new ( ) ; fn tag_html ( class : & str , title : & str , contents : & str ) -> String { format ! ( r#"<span class="stab {}" title="{}">{}</span>"# class Escape ( title ) contents ) } // The trailing space after each tag is to space it properly against the rest of the docs. if let Some ( depr ) = & item . deprecation ( tcx ) { let mut message = " " ; if ! stability :: deprecation_in_effect ( depr . is_since_rustc_version , depr . since . map ( | s | s . as_str ( ) ) . as_deref ( ) , ) { message = " " ; } tags += & tag_html ( " " , " " , message ) ; } // The "rustc_private" crates are permanently unstable so it makes no sense // to render "unstable" everywhere. if item . stability ( tcx ) . as_ref ( ) . map ( | s | s . level . is_unstable ( ) && s . feature != sym :: rustc_private ) == Some ( true ) { tags += & tag_html ( " " , " " , " " ) ; } let cfg = match ( & item . cfg , parent . cfg . as_ref ( ) ) { ( Some ( cfg ) , Some ( parent_cfg ) ) => cfg . simplify_with ( parent_cfg ) , ( cfg , _ ) => cfg . as_deref ( ) . cloned ( ) , } ; debug ! ( " " item cfg parent cfg cfg ) ; if let Some ( ref cfg ) = cfg { tags += & tag_html ( " " , & cfg . render_long_plain ( ) , & cfg . render_short_html ( ) ) ; } tags }
Render the stability, deprecation and portability tags that are displayed in the item's summary
at the module level.
Render the stability deprecation and portability tags that are displayed in the item ' s summary at the module level .
item
&clean::Item
parent
&clean::Item
tcx
TyCtxt<'_>
item
&clean::Item
parent
&clean::Item
tcx
TyCtxt<'_>