Skip to content

Commit 912e1ae

Browse files
Remove unneeded jinja comments in templates
1 parent 86493d4 commit 912e1ae

File tree

5 files changed

+48
-48
lines changed

5 files changed

+48
-48
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% if !items.is_empty() %}
22
<span class="item-info">
33
{% for item in items %}
4-
{{item|safe}} {# #}
4+
{{item|safe}}
55
{% endfor %}
66
</span>
77
{% endif %}

src/librustdoc/html/templates/page.html

+31-31
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
<link rel="stylesheet" {#+ #}
1313
href="{{static_root_path|safe}}{{files.normalize_css}}"> {# #}
1414
<link rel="stylesheet" {#+ #}
15-
href="{{static_root_path|safe}}{{files.rustdoc_css}}"> {# #}
15+
href="{{static_root_path|safe}}{{files.rustdoc_css}}">
1616
{% if !layout.default_settings.is_empty() %}
1717
<script id="default-settings" {#+ #}
1818
{%~ for (k, v) in layout.default_settings ~%}
1919
data-{{k}}="{{v}}"
2020
{% endfor %}
21-
></script> {# #}
21+
></script>
2222
{% endif %}
2323
<meta name="rustdoc-vars" {#+ #}
2424
data-root-path="{{page.root_path|safe}}" {#+ #}
@@ -31,36 +31,36 @@
3131
data-search-js="{{files.search_js}}" {#+ #}
3232
data-settings-js="{{files.settings_js}}" {#+ #}
3333
> {# #}
34-
<script src="{{static_root_path|safe}}{{files.storage_js}}"></script> {# #}
34+
<script src="{{static_root_path|safe}}{{files.storage_js}}"></script>
3535
{% if page.css_class.contains("crate") %}
36-
<script defer src="{{page.root_path|safe}}crates{{page.resource_suffix}}.js"></script> {# #}
36+
<script defer src="{{page.root_path|safe}}crates{{page.resource_suffix}}.js"></script>
3737
{% else if page.css_class == "src" %}
3838
<script defer src="{{static_root_path|safe}}{{files.src_script_js}}"></script> {# #}
39-
<script defer src="{{page.root_path|safe}}src-files{{page.resource_suffix}}.js"></script> {# #}
39+
<script defer src="{{page.root_path|safe}}src-files{{page.resource_suffix}}.js"></script>
4040
{% else if !page.css_class.contains("mod") %}
41-
<script defer src="sidebar-items{{page.resource_suffix}}.js"></script> {# #}
41+
<script defer src="sidebar-items{{page.resource_suffix}}.js"></script>
4242
{% else if !page.css_class.contains("sys") %}
43-
<script defer src="../sidebar-items{{page.resource_suffix}}.js"></script> {# #}
43+
<script defer src="../sidebar-items{{page.resource_suffix}}.js"></script>
4444
{% endif %}
45-
<script defer src="{{static_root_path|safe}}{{files.main_js}}"></script> {# #}
45+
<script defer src="{{static_root_path|safe}}{{files.main_js}}"></script>
4646
{% if layout.scrape_examples_extension %}
47-
<script defer src="{{static_root_path|safe}}{{files.scrape_examples_js}}"></script> {# #}
47+
<script defer src="{{static_root_path|safe}}{{files.scrape_examples_js}}"></script>
4848
{% endif %}
4949
<noscript> {# #}
5050
<link rel="stylesheet" {#+ #}
5151
href="{{static_root_path|safe}}{{files.noscript_css}}"> {# #}
52-
</noscript> {# #}
52+
</noscript>
5353
{% if layout.css_file_extension.is_some() %}
5454
<link rel="stylesheet" {#+ #}
55-
href="{{page.root_path|safe}}theme{{page.resource_suffix}}.css"> {# #}
55+
href="{{page.root_path|safe}}theme{{page.resource_suffix}}.css">
5656
{% endif %}
5757
{% if !layout.favicon.is_empty() %}
58-
<link rel="icon" href="{{layout.favicon}}"> {# #}
58+
<link rel="icon" href="{{layout.favicon}}">
5959
{% else %}
6060
<link rel="alternate icon" type="image/png" {#+ #}
6161
href="{{static_root_path|safe}}{{files.rust_favicon_png_32}}"> {# #}
6262
<link rel="icon" type="image/svg+xml" {#+ #}
63-
href="{{static_root_path|safe}}{{files.rust_favicon_svg}}"> {# #}
63+
href="{{static_root_path|safe}}{{files.rust_favicon_svg}}">
6464
{% endif %}
6565
{{ layout.external_html.in_header|safe }}
6666
</head> {# #}
@@ -69,60 +69,60 @@
6969
<div class="warning"> {# #}
7070
This old browser is unsupported and will most likely display funky things. {# #}
7171
</div> {# #}
72-
<![endif]--> {# #}
72+
<![endif]-->
7373
{{ layout.external_html.before_content|safe }}
7474
{% if page.css_class != "src" %}
7575
<nav class="mobile-topbar"> {# #}
76-
<button class="sidebar-menu-toggle" title="show sidebar"></button> {# #}
76+
<button class="sidebar-menu-toggle" title="show sidebar"></button>
7777
{% if !layout.logo.is_empty() || page.rust_logo %}
78-
<a class="logo-container" href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html"> {# #}
78+
<a class="logo-container" href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html">
7979
{% if page.rust_logo %}
80-
<img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt=""> {# #}
80+
<img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="">
8181
{% else if !layout.logo.is_empty() %}
82-
<img src="{{layout.logo}}" alt=""> {# #}
82+
<img src="{{layout.logo}}" alt="">
8383
{% endif %}
84-
</a> {# #}
84+
</a>
8585
{% endif %}
8686
</nav>
8787
{% endif %}
88-
<nav class="sidebar"> {# #}
88+
<nav class="sidebar">
8989
{% if page.css_class != "src" %}
9090
<div class="sidebar-crate">
9191
{% if !layout.logo.is_empty() || page.rust_logo %}
92-
<a class="logo-container" href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html"> {# #}
92+
<a class="logo-container" href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html">
9393
{% if page.rust_logo %}
94-
<img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {# #}
94+
<img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo">
9595
{% else if !layout.logo.is_empty() %}
96-
<img src="{{layout.logo}}" alt="logo"> {# #}
96+
<img src="{{layout.logo}}" alt="logo">
9797
{% endif %}
98-
</a> {# #}
98+
</a>
9999
{% endif %}
100100
<h2> {# #}
101-
<a href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html">{{display_krate|wrapped|safe}}</a> {# #}
101+
<a href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html">{{display_krate|wrapped|safe}}</a>
102102
{% if !display_krate_version_number.is_empty() %}
103103
<span class="version">{{+ display_krate_version_number}}</span>
104104
{% endif %}
105105
</h2> {# #}
106-
</div> {# #}
106+
</div>
107107
{% if !display_krate_version_extra.is_empty() %}
108-
<div class="version">{{+ display_krate_version_extra}}</div> {# #}
108+
<div class="version">{{+ display_krate_version_extra}}</div>
109109
{% endif %}
110110
{% else %}
111111
<div class="src-sidebar-title"> {# #}
112112
<h2>Files</h2> {# #}
113-
</div> {# #}
113+
</div>
114114
{% endif %}
115115
{{ sidebar|safe }}
116116
</nav> {# #}
117117
<div class="sidebar-resizer"></div> {# #}
118-
<main> {# #}
118+
<main>
119119
{% if page.css_class != "src" %}<div class="width-limiter">{% endif %}
120120
{# defined in storage.js to avoid duplicating complex UI across every page #}
121121
{# and because the search form only works if JS is enabled anyway #}
122122
<rustdoc-search></rustdoc-search> {# #}
123-
<section id="main-content" class="content">{{ content|safe }}</section> {# #}
123+
<section id="main-content" class="content">{{ content|safe }}</section>
124124
{% if page.css_class != "src" %}</div>{% endif %}
125-
</main> {# #}
125+
</main>
126126
{{ layout.external_html.after_content|safe }}
127127
</body> {# #}
128128
</html> {# #}

src/librustdoc/html/templates/short_item_info.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
<div class="stab deprecated"> {# #}
44
<span class="emoji">👎</span> {# #}
55
<span>{{message|safe}}</span> {# #}
6-
</div> {# #}
6+
</div>
77
{% when Self::Unstable with { feature, tracking } %}
88
<div class="stab unstable"> {# #}
99
<span class="emoji">🔬</span> {# #}
1010
<span> {# #}
1111
This is a nightly-only experimental API. ({# #}
12-
<code>{{feature}}</code> {# #}
12+
<code>{{feature}}</code>
1313
{% match tracking %}
1414
{% when Some with ((url, num)) %}
15-
&nbsp;<a href="{{url}}{{num}}">#{{num}}</a> {# #}
15+
&nbsp;<a href="{{url}}{{num}}">#{{num}}</a>
1616
{% when None %}
1717
{% endmatch %}
1818
) {# #}
1919
</span> {# #}
20-
</div> {# #}
20+
</div>
2121
{% when Self::Portability with { message } %}
22-
<div class="stab portability">{{message|safe}}</div> {# #}
22+
<div class="stab portability">{{message|safe}}</div>
2323
{% endmatch %}

src/librustdoc/html/templates/sidebar.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h3> {# #}
3030
{% else %}
3131
{{link.name}}
3232
{% endmatch %}
33-
</a> {# #}
33+
</a>
3434
{% if !link.children.is_empty() %}
3535
<ul>
3636
{% for child in link.children %}
+10-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h2 id="layout" class="section-header"> {# #}
22
Layout<a href="#layout" class="anchor">§</a> {# #}
33
</h2> {# #}
4-
<div class="docblock"> {# #}
4+
<div class="docblock">
55
{% match type_layout_size %}
66
{% when Ok(type_layout_size) %}
77
<div class="warning"> {# #}
@@ -14,19 +14,19 @@ <h2 id="layout" class="section-header"> {# #}
1414
chapter for details on type layout guarantees. {# #}
1515
</p> {# #}
1616
</div> {# #}
17-
<p><strong>Size:</strong> {{+ type_layout_size|safe }}</p> {# #}
17+
<p><strong>Size:</strong> {{+ type_layout_size|safe }}</p>
1818
{% if !variants.is_empty() %}
1919
<p> {# #}
2020
<strong>Size for each variant:</strong> {# #}
2121
</p> {# #}
22-
<ul> {# #}
22+
<ul>
2323
{% for (name, layout_size) in variants %}
2424
<li> {# #}
2525
<code>{{ name }}</code>: {#+ #}
2626
{{ layout_size|safe }}
27-
</li> {# #}
27+
</li>
2828
{% endfor %}
29-
</ul> {# #}
29+
</ul>
3030
{% endif %}
3131
{# This kind of layout error can occur with valid code, e.g. if you try to
3232
get the layout of a generic type such as `Vec<T>`. #}
@@ -35,29 +35,29 @@ <h2 id="layout" class="section-header"> {# #}
3535
<strong>Note:</strong> Unable to compute type layout, {#+ #}
3636
possibly due to this type having generic parameters. {#+ #}
3737
Layout can only be computed for concrete, fully-instantiated types. {# #}
38-
</p> {# #}
38+
</p>
3939
{# This kind of error probably can't happen with valid code, but we don't
4040
want to panic and prevent the docs from building, so we just let the
4141
user know that we couldn't compute the layout. #}
4242
{% when Err(LayoutError::SizeOverflow(_)) %}
4343
<p> {# #}
4444
<strong>Note:</strong> Encountered an error during type layout; {#+ #}
4545
the type was too big. {# #}
46-
</p> {# #}
46+
</p>
4747
{% when Err(LayoutError::ReferencesError(_)) %}
4848
<p> {# #}
4949
<strong>Note:</strong> Encountered an error during type layout; {#+ #}
5050
the type references errors. {# #}
51-
</p> {# #}
51+
</p>
5252
{% when Err(LayoutError::NormalizationFailure(_, _)) %}
5353
<p> {# #}
5454
<strong>Note:</strong> Encountered an error during type layout; {#+ #}
5555
the type failed to be normalized. {# #}
56-
</p> {# #}
56+
</p>
5757
{% when Err(LayoutError::Cycle(_)) %}
5858
<p> {# #}
5959
<strong>Note:</strong> Encountered an error during type layout; {#+ #}
6060
the type's layout depended on the type's layout itself. {# #}
61-
</p> {# #}
61+
</p>
6262
{% endmatch %}
6363
</div> {# #}

0 commit comments

Comments
 (0)