summaryrefslogtreecommitdiffstats
path: root/src/librustdoc/html/templates
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustdoc/html/templates')
-rw-r--r--src/librustdoc/html/templates/item_info.html2
-rw-r--r--src/librustdoc/html/templates/item_union.html19
-rw-r--r--src/librustdoc/html/templates/page.html4
-rw-r--r--src/librustdoc/html/templates/print_item.html4
4 files changed, 15 insertions, 14 deletions
diff --git a/src/librustdoc/html/templates/item_info.html b/src/librustdoc/html/templates/item_info.html
index d2ea9bdae..9e65ae95e 100644
--- a/src/librustdoc/html/templates/item_info.html
+++ b/src/librustdoc/html/templates/item_info.html
@@ -1,5 +1,5 @@
{% if !items.is_empty() %}
- <span class="item-info"> {# #}
+ <span class="item-info">
{% for item in items %}
{{item|safe}} {# #}
{% endfor %}
diff --git a/src/librustdoc/html/templates/item_union.html b/src/librustdoc/html/templates/item_union.html
index c21967005..f6d2fa348 100644
--- a/src/librustdoc/html/templates/item_union.html
+++ b/src/librustdoc/html/templates/item_union.html
@@ -1,17 +1,18 @@
<pre class="rust item-decl"><code>
- {{ self::item_template_render_attributes_in_pre(self.borrow()) | safe }}
+ {{ self.render_attributes_in_pre() | safe }}
{{ self.render_union() | safe }}
</code></pre>
-{{ self::item_template_document(self.borrow()) | safe }}
+{{ self.document() | safe }}
{% if self.fields_iter().peek().is_some() %}
- <h2 id="fields" class="fields small-section-header">
- Fields<a href="#fields" class="anchor">§</a>
+ <h2 id="fields" class="fields small-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 }} small-section-header">
- <a href="#structfield.{{ name }}" class="anchor field">§</a>
- <code>{{ name }}: {{ self.print_ty(ty) | safe }}</code>
+ <span id="structfield.{{ name }}" {#+ #}
+ class="{{ ItemType::StructField +}} small-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>
@@ -19,5 +20,5 @@
{{ self.document_field(field) | safe }}
{% endfor %}
{% endif %}
-{{ self::item_template_render_assoc_items(self.borrow()) | safe }}
-{{ self::item_template_document_type_layout(self.borrow()) | safe }}
+{{ self.render_assoc_items() | safe }}
+{{ self.document_type_layout() | safe }}
diff --git a/src/librustdoc/html/templates/page.html b/src/librustdoc/html/templates/page.html
index 9133f899a..d4ec9c34b 100644
--- a/src/librustdoc/html/templates/page.html
+++ b/src/librustdoc/html/templates/page.html
@@ -24,13 +24,14 @@
{% endfor %}
></script> {# #}
{% endif %}
- <div id="rustdoc-vars" {#+ #}
+ <meta name="rustdoc-vars" {#+ #}
data-root-path="{{page.root_path|safe}}" {#+ #}
data-static-root-path="{{static_root_path|safe}}" {#+ #}
data-current-crate="{{layout.krate}}" {#+ #}
data-themes="{{themes|join(",") }}" {#+ #}
data-resource-suffix="{{page.resource_suffix}}" {#+ #}
data-rustdoc-version="{{rustdoc_version}}" {#+ #}
+ data-channel="{{rust_channel}}" {#+ #}
data-search-js="{{files.search_js}}" {#+ #}
data-settings-js="{{files.settings_js}}" {#+ #}
data-settings-css="{{files.settings_css}}" {#+ #}
@@ -38,7 +39,6 @@
data-theme-dark-css="{{files.theme_dark_css}}" {#+ #}
data-theme-ayu-css="{{files.theme_ayu_css}}" {#+ #}
> {# #}
- </div> {# #}
<script src="{{static_root_path|safe}}{{files.storage_js}}"></script> {# #}
{% if page.css_class.contains("crate") %}
<script defer src="{{page.root_path|safe}}crates{{page.resource_suffix}}.js"></script> {# #}
diff --git a/src/librustdoc/html/templates/print_item.html b/src/librustdoc/html/templates/print_item.html
index edabac9a0..68a295ae0 100644
--- a/src/librustdoc/html/templates/print_item.html
+++ b/src/librustdoc/html/templates/print_item.html
@@ -1,5 +1,5 @@
<div class="main-heading"> {# #}
- <h1> {# #}
+ <h1>
{{typ}}
{# The breadcrumbs of the item path, like std::string #}
{% for component in path_components %}
@@ -12,7 +12,7 @@
alt="Copy item path"> {# #}
</button> {# #}
</h1> {# #}
- <span class="out-of-band"> {# #}
+ <span class="out-of-band">
{% if !stability_since_raw.is_empty() %}
{{ stability_since_raw|safe +}} · {#+ #}
{% endif %}