summaryrefslogtreecommitdiffstats
path: root/src/librustdoc/html/templates/item_union.html
blob: 8db7986fa7506e719e05a8d69f78c048d8913844 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<pre class="rust item-decl"><code>
    {{ self.render_attributes_in_pre() | safe }}
    {{ self.render_union() | safe }}
</code></pre>
{{ self.document() | safe }}
{% if self.fields_iter().peek().is_some() %}
    <h2 id="fields" class="fields section-header"> {# #}
        Fields<a href="#fields" class="anchor">§</a> {# #}
    </h2>
    {% for (field, ty) in self.fields_iter() %}
        {% let name = field.name.expect("union field name") %}
        <span id="structfield.{{ name }}" {#+ #}
            class="{{ ItemType::StructField +}} section-header"> {# #}
            <a href="#structfield.{{ name }}" class="anchor field">§</a> {# #}
            <code>{{ name }}: {{+ self.print_ty(ty) | safe }}</code> {# #}
        </span>
        {% if let Some(stability_class) = self.stability_field(field) %}
            <span class="stab {{ stability_class }}"></span>
        {% endif %}
        {{ self.document_field(field) | safe }}
    {% endfor %}
{% endif %}
{{ self.render_assoc_items() | safe }}
{{ self.document_type_layout() | safe }}