Remove unneeded jinja comments in templates
This commit is contained in:
parent
69150396bf
commit
575df06a8b
@ -1,7 +1,7 @@
|
|||||||
{% if !items.is_empty() %}
|
{% if !items.is_empty() %}
|
||||||
<span class="item-info">
|
<span class="item-info">
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
{{item|safe}} {# #}
|
{{item|safe}}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -12,13 +12,13 @@
|
|||||||
<link rel="stylesheet" {#+ #}
|
<link rel="stylesheet" {#+ #}
|
||||||
href="{{static_root_path|safe}}{{files.normalize_css}}"> {# #}
|
href="{{static_root_path|safe}}{{files.normalize_css}}"> {# #}
|
||||||
<link rel="stylesheet" {#+ #}
|
<link rel="stylesheet" {#+ #}
|
||||||
href="{{static_root_path|safe}}{{files.rustdoc_css}}"> {# #}
|
href="{{static_root_path|safe}}{{files.rustdoc_css}}">
|
||||||
{% if !layout.default_settings.is_empty() %}
|
{% if !layout.default_settings.is_empty() %}
|
||||||
<script id="default-settings" {#+ #}
|
<script id="default-settings" {#+ #}
|
||||||
{%~ for (k, v) in layout.default_settings ~%}
|
{%~ for (k, v) in layout.default_settings ~%}
|
||||||
data-{{k}}="{{v}}"
|
data-{{k}}="{{v}}"
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
></script> {# #}
|
></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<meta name="rustdoc-vars" {#+ #}
|
<meta name="rustdoc-vars" {#+ #}
|
||||||
data-root-path="{{page.root_path|safe}}" {#+ #}
|
data-root-path="{{page.root_path|safe}}" {#+ #}
|
||||||
@ -31,36 +31,36 @@
|
|||||||
data-search-js="{{files.search_js}}" {#+ #}
|
data-search-js="{{files.search_js}}" {#+ #}
|
||||||
data-settings-js="{{files.settings_js}}" {#+ #}
|
data-settings-js="{{files.settings_js}}" {#+ #}
|
||||||
> {# #}
|
> {# #}
|
||||||
<script src="{{static_root_path|safe}}{{files.storage_js}}"></script> {# #}
|
<script src="{{static_root_path|safe}}{{files.storage_js}}"></script>
|
||||||
{% if page.css_class.contains("crate") %}
|
{% if page.css_class.contains("crate") %}
|
||||||
<script defer src="{{page.root_path|safe}}crates{{page.resource_suffix}}.js"></script> {# #}
|
<script defer src="{{page.root_path|safe}}crates{{page.resource_suffix}}.js"></script>
|
||||||
{% else if page.css_class == "src" %}
|
{% else if page.css_class == "src" %}
|
||||||
<script defer src="{{static_root_path|safe}}{{files.src_script_js}}"></script> {# #}
|
<script defer src="{{static_root_path|safe}}{{files.src_script_js}}"></script> {# #}
|
||||||
<script defer src="{{page.root_path|safe}}src-files{{page.resource_suffix}}.js"></script> {# #}
|
<script defer src="{{page.root_path|safe}}src-files{{page.resource_suffix}}.js"></script>
|
||||||
{% else if !page.css_class.contains("mod") %}
|
{% else if !page.css_class.contains("mod") %}
|
||||||
<script defer src="sidebar-items{{page.resource_suffix}}.js"></script> {# #}
|
<script defer src="sidebar-items{{page.resource_suffix}}.js"></script>
|
||||||
{% else if !page.css_class.contains("sys") %}
|
{% else if !page.css_class.contains("sys") %}
|
||||||
<script defer src="../sidebar-items{{page.resource_suffix}}.js"></script> {# #}
|
<script defer src="../sidebar-items{{page.resource_suffix}}.js"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<script defer src="{{static_root_path|safe}}{{files.main_js}}"></script> {# #}
|
<script defer src="{{static_root_path|safe}}{{files.main_js}}"></script>
|
||||||
{% if layout.scrape_examples_extension %}
|
{% if layout.scrape_examples_extension %}
|
||||||
<script defer src="{{static_root_path|safe}}{{files.scrape_examples_js}}"></script> {# #}
|
<script defer src="{{static_root_path|safe}}{{files.scrape_examples_js}}"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<noscript> {# #}
|
<noscript> {# #}
|
||||||
<link rel="stylesheet" {#+ #}
|
<link rel="stylesheet" {#+ #}
|
||||||
href="{{static_root_path|safe}}{{files.noscript_css}}"> {# #}
|
href="{{static_root_path|safe}}{{files.noscript_css}}"> {# #}
|
||||||
</noscript> {# #}
|
</noscript>
|
||||||
{% if layout.css_file_extension.is_some() %}
|
{% if layout.css_file_extension.is_some() %}
|
||||||
<link rel="stylesheet" {#+ #}
|
<link rel="stylesheet" {#+ #}
|
||||||
href="{{page.root_path|safe}}theme{{page.resource_suffix}}.css"> {# #}
|
href="{{page.root_path|safe}}theme{{page.resource_suffix}}.css">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if !layout.favicon.is_empty() %}
|
{% if !layout.favicon.is_empty() %}
|
||||||
<link rel="icon" href="{{layout.favicon}}"> {# #}
|
<link rel="icon" href="{{layout.favicon}}">
|
||||||
{% else %}
|
{% else %}
|
||||||
<link rel="alternate icon" type="image/png" {#+ #}
|
<link rel="alternate icon" type="image/png" {#+ #}
|
||||||
href="{{static_root_path|safe}}{{files.rust_favicon_png_32}}"> {# #}
|
href="{{static_root_path|safe}}{{files.rust_favicon_png_32}}"> {# #}
|
||||||
<link rel="icon" type="image/svg+xml" {#+ #}
|
<link rel="icon" type="image/svg+xml" {#+ #}
|
||||||
href="{{static_root_path|safe}}{{files.rust_favicon_svg}}"> {# #}
|
href="{{static_root_path|safe}}{{files.rust_favicon_svg}}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ layout.external_html.in_header|safe }}
|
{{ layout.external_html.in_header|safe }}
|
||||||
</head> {# #}
|
</head> {# #}
|
||||||
@ -69,60 +69,60 @@
|
|||||||
<div class="warning"> {# #}
|
<div class="warning"> {# #}
|
||||||
This old browser is unsupported and will most likely display funky things. {# #}
|
This old browser is unsupported and will most likely display funky things. {# #}
|
||||||
</div> {# #}
|
</div> {# #}
|
||||||
<![endif]--> {# #}
|
<![endif]-->
|
||||||
{{ layout.external_html.before_content|safe }}
|
{{ layout.external_html.before_content|safe }}
|
||||||
{% if page.css_class != "src" %}
|
{% if page.css_class != "src" %}
|
||||||
<nav class="mobile-topbar"> {# #}
|
<nav class="mobile-topbar"> {# #}
|
||||||
<button class="sidebar-menu-toggle" title="show sidebar"></button> {# #}
|
<button class="sidebar-menu-toggle" title="show sidebar"></button>
|
||||||
{% if !layout.logo.is_empty() || page.rust_logo %}
|
{% if !layout.logo.is_empty() || page.rust_logo %}
|
||||||
<a class="logo-container" href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html"> {# #}
|
<a class="logo-container" href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html">
|
||||||
{% if page.rust_logo %}
|
{% if page.rust_logo %}
|
||||||
<img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt=""> {# #}
|
<img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="">
|
||||||
{% else if !layout.logo.is_empty() %}
|
{% else if !layout.logo.is_empty() %}
|
||||||
<img src="{{layout.logo}}" alt=""> {# #}
|
<img src="{{layout.logo}}" alt="">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a> {# #}
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</nav>
|
</nav>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<nav class="sidebar"> {# #}
|
<nav class="sidebar">
|
||||||
{% if page.css_class != "src" %}
|
{% if page.css_class != "src" %}
|
||||||
<div class="sidebar-crate">
|
<div class="sidebar-crate">
|
||||||
{% if !layout.logo.is_empty() || page.rust_logo %}
|
{% if !layout.logo.is_empty() || page.rust_logo %}
|
||||||
<a class="logo-container" href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html"> {# #}
|
<a class="logo-container" href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html">
|
||||||
{% if page.rust_logo %}
|
{% if page.rust_logo %}
|
||||||
<img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {# #}
|
<img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo">
|
||||||
{% else if !layout.logo.is_empty() %}
|
{% else if !layout.logo.is_empty() %}
|
||||||
<img src="{{layout.logo}}" alt="logo"> {# #}
|
<img src="{{layout.logo}}" alt="logo">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a> {# #}
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<h2> {# #}
|
<h2> {# #}
|
||||||
<a href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html">{{display_krate|wrapped|safe}}</a> {# #}
|
<a href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html">{{display_krate|wrapped|safe}}</a>
|
||||||
{% if !display_krate_version_number.is_empty() %}
|
{% if !display_krate_version_number.is_empty() %}
|
||||||
<span class="version">{{+ display_krate_version_number}}</span>
|
<span class="version">{{+ display_krate_version_number}}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h2> {# #}
|
</h2> {# #}
|
||||||
</div> {# #}
|
</div>
|
||||||
{% if !display_krate_version_extra.is_empty() %}
|
{% if !display_krate_version_extra.is_empty() %}
|
||||||
<div class="version">{{+ display_krate_version_extra}}</div> {# #}
|
<div class="version">{{+ display_krate_version_extra}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="src-sidebar-title"> {# #}
|
<div class="src-sidebar-title"> {# #}
|
||||||
<h2>Files</h2> {# #}
|
<h2>Files</h2> {# #}
|
||||||
</div> {# #}
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ sidebar|safe }}
|
{{ sidebar|safe }}
|
||||||
</nav> {# #}
|
</nav> {# #}
|
||||||
<div class="sidebar-resizer"></div> {# #}
|
<div class="sidebar-resizer"></div> {# #}
|
||||||
<main> {# #}
|
<main>
|
||||||
{% if page.css_class != "src" %}<div class="width-limiter">{% endif %}
|
{% if page.css_class != "src" %}<div class="width-limiter">{% endif %}
|
||||||
{# defined in storage.js to avoid duplicating complex UI across every page #}
|
{# defined in storage.js to avoid duplicating complex UI across every page #}
|
||||||
{# and because the search form only works if JS is enabled anyway #}
|
{# and because the search form only works if JS is enabled anyway #}
|
||||||
<rustdoc-search></rustdoc-search> {# #}
|
<rustdoc-search></rustdoc-search> {# #}
|
||||||
<section id="main-content" class="content">{{ content|safe }}</section> {# #}
|
<section id="main-content" class="content">{{ content|safe }}</section>
|
||||||
{% if page.css_class != "src" %}</div>{% endif %}
|
{% if page.css_class != "src" %}</div>{% endif %}
|
||||||
</main> {# #}
|
</main>
|
||||||
{{ layout.external_html.after_content|safe }}
|
{{ layout.external_html.after_content|safe }}
|
||||||
</body> {# #}
|
</body> {# #}
|
||||||
</html> {# #}
|
</html> {# #}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="main-heading"> {# #}
|
<div class="main-heading">
|
||||||
{% if !path_components.is_empty() %}
|
{% if !path_components.is_empty() %}
|
||||||
<span class="rustdoc-breadcrumbs">
|
<span class="rustdoc-breadcrumbs">
|
||||||
{% for (i, component) in path_components.iter().enumerate() %}
|
{% for (i, component) in path_components.iter().enumerate() %}
|
||||||
|
@ -3,21 +3,21 @@
|
|||||||
<div class="stab deprecated"> {# #}
|
<div class="stab deprecated"> {# #}
|
||||||
<span class="emoji">👎</span> {# #}
|
<span class="emoji">👎</span> {# #}
|
||||||
<span>{{message|safe}}</span> {# #}
|
<span>{{message|safe}}</span> {# #}
|
||||||
</div> {# #}
|
</div>
|
||||||
{% when Self::Unstable with { feature, tracking } %}
|
{% when Self::Unstable with { feature, tracking } %}
|
||||||
<div class="stab unstable"> {# #}
|
<div class="stab unstable"> {# #}
|
||||||
<span class="emoji">🔬</span> {# #}
|
<span class="emoji">🔬</span> {# #}
|
||||||
<span> {# #}
|
<span> {# #}
|
||||||
This is a nightly-only experimental API. ({# #}
|
This is a nightly-only experimental API. ({# #}
|
||||||
<code>{{feature}}</code> {# #}
|
<code>{{feature}}</code>
|
||||||
{% match tracking %}
|
{% match tracking %}
|
||||||
{% when Some with ((url, num)) %}
|
{% when Some with ((url, num)) %}
|
||||||
<a href="{{url}}{{num}}">#{{num}}</a> {# #}
|
<a href="{{url}}{{num}}">#{{num}}</a>
|
||||||
{% when None %}
|
{% when None %}
|
||||||
{% endmatch %}
|
{% endmatch %}
|
||||||
) {# #}
|
) {# #}
|
||||||
</span> {# #}
|
</span> {# #}
|
||||||
</div> {# #}
|
</div>
|
||||||
{% when Self::Portability with { message } %}
|
{% when Self::Portability with { message } %}
|
||||||
<div class="stab portability">{{message|safe}}</div> {# #}
|
<div class="stab portability">{{message|safe}}</div>
|
||||||
{% endmatch %}
|
{% endmatch %}
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
{{link.name}}
|
{{link.name}}
|
||||||
{% endmatch %}
|
{% endmatch %}
|
||||||
</a> {# #}
|
</a>
|
||||||
{% if !link.children.is_empty() %}
|
{% if !link.children.is_empty() %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for child in link.children %}
|
{% for child in link.children %}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% endmatch %}
|
{% endmatch %}
|
||||||
<div class="example-wrap"> {# #}
|
<div class="example-wrap">
|
||||||
{# https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag#data-nosnippet-attr
|
{# https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag#data-nosnippet-attr
|
||||||
Do not show "1 2 3 4 5 ..." in web search results. #}
|
Do not show "1 2 3 4 5 ..." in web search results. #}
|
||||||
<div data-nosnippet><pre class="src-line-numbers">
|
<div data-nosnippet><pre class="src-line-numbers">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<h2 id="layout" class="section-header"> {# #}
|
<h2 id="layout" class="section-header"> {# #}
|
||||||
Layout<a href="#layout" class="anchor">§</a> {# #}
|
Layout<a href="#layout" class="anchor">§</a> {# #}
|
||||||
</h2> {# #}
|
</h2> {# #}
|
||||||
<div class="docblock"> {# #}
|
<div class="docblock">
|
||||||
{% match type_layout_size %}
|
{% match type_layout_size %}
|
||||||
{% when Ok(type_layout_size) %}
|
{% when Ok(type_layout_size) %}
|
||||||
<div class="warning"> {# #}
|
<div class="warning"> {# #}
|
||||||
@ -14,19 +14,19 @@
|
|||||||
chapter for details on type layout guarantees. {# #}
|
chapter for details on type layout guarantees. {# #}
|
||||||
</p> {# #}
|
</p> {# #}
|
||||||
</div> {# #}
|
</div> {# #}
|
||||||
<p><strong>Size:</strong> {{+ type_layout_size|safe }}</p> {# #}
|
<p><strong>Size:</strong> {{+ type_layout_size|safe }}</p>
|
||||||
{% if !variants.is_empty() %}
|
{% if !variants.is_empty() %}
|
||||||
<p> {# #}
|
<p> {# #}
|
||||||
<strong>Size for each variant:</strong> {# #}
|
<strong>Size for each variant:</strong> {# #}
|
||||||
</p> {# #}
|
</p> {# #}
|
||||||
<ul> {# #}
|
<ul>
|
||||||
{% for (name, layout_size) in variants %}
|
{% for (name, layout_size) in variants %}
|
||||||
<li> {# #}
|
<li> {# #}
|
||||||
<code>{{ name }}</code>: {#+ #}
|
<code>{{ name }}</code>: {#+ #}
|
||||||
{{ layout_size|safe }}
|
{{ layout_size|safe }}
|
||||||
</li> {# #}
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul> {# #}
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# This kind of layout error can occur with valid code, e.g. if you try to
|
{# This kind of layout error can occur with valid code, e.g. if you try to
|
||||||
get the layout of a generic type such as `Vec<T>`. #}
|
get the layout of a generic type such as `Vec<T>`. #}
|
||||||
@ -35,7 +35,7 @@
|
|||||||
<strong>Note:</strong> Unable to compute type layout, {#+ #}
|
<strong>Note:</strong> Unable to compute type layout, {#+ #}
|
||||||
possibly due to this type having generic parameters. {#+ #}
|
possibly due to this type having generic parameters. {#+ #}
|
||||||
Layout can only be computed for concrete, fully-instantiated types. {# #}
|
Layout can only be computed for concrete, fully-instantiated types. {# #}
|
||||||
</p> {# #}
|
</p>
|
||||||
{# This kind of error probably can't happen with valid code, but we don't
|
{# This kind of error probably can't happen with valid code, but we don't
|
||||||
want to panic and prevent the docs from building, so we just let the
|
want to panic and prevent the docs from building, so we just let the
|
||||||
user know that we couldn't compute the layout. #}
|
user know that we couldn't compute the layout. #}
|
||||||
@ -43,21 +43,21 @@
|
|||||||
<p> {# #}
|
<p> {# #}
|
||||||
<strong>Note:</strong> Encountered an error during type layout; {#+ #}
|
<strong>Note:</strong> Encountered an error during type layout; {#+ #}
|
||||||
the type was too big. {# #}
|
the type was too big. {# #}
|
||||||
</p> {# #}
|
</p>
|
||||||
{% when Err(LayoutError::ReferencesError(_)) %}
|
{% when Err(LayoutError::ReferencesError(_)) %}
|
||||||
<p> {# #}
|
<p> {# #}
|
||||||
<strong>Note:</strong> Encountered an error during type layout; {#+ #}
|
<strong>Note:</strong> Encountered an error during type layout; {#+ #}
|
||||||
the type references errors. {# #}
|
the type references errors. {# #}
|
||||||
</p> {# #}
|
</p>
|
||||||
{% when Err(LayoutError::NormalizationFailure(_, _)) %}
|
{% when Err(LayoutError::NormalizationFailure(_, _)) %}
|
||||||
<p> {# #}
|
<p> {# #}
|
||||||
<strong>Note:</strong> Encountered an error during type layout; {#+ #}
|
<strong>Note:</strong> Encountered an error during type layout; {#+ #}
|
||||||
the type failed to be normalized. {# #}
|
the type failed to be normalized. {# #}
|
||||||
</p> {# #}
|
</p>
|
||||||
{% when Err(LayoutError::Cycle(_)) %}
|
{% when Err(LayoutError::Cycle(_)) %}
|
||||||
<p> {# #}
|
<p> {# #}
|
||||||
<strong>Note:</strong> Encountered an error during type layout; {#+ #}
|
<strong>Note:</strong> Encountered an error during type layout; {#+ #}
|
||||||
the type's layout depended on the type's layout itself. {# #}
|
the type's layout depended on the type's layout itself. {# #}
|
||||||
</p> {# #}
|
</p>
|
||||||
{% endmatch %}
|
{% endmatch %}
|
||||||
</div> {# #}
|
</div> {# #}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user