Skip to content

Commit 575df06

Browse files
Remove unneeded jinja comments in templates
1 parent 6915039 commit 575df06

7 files changed

Lines changed: 50 additions & 50 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% if !items.is_empty() %}
22
<spanclass="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‎

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
<linkrel="stylesheet" {#+#}
1313
href="{{static_root_path|safe}}{{files.normalize_css}}"> {# #}
1414
<linkrel="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
<scriptid="default-settings" {#+#}
1818
{%~for(k,v)inlayout.default_settings~%}
1919
data-{{k}}="{{v}}"
2020
{%endfor%}
21-
></script> {# #}
21+
></script>
2222
{% endif %}
2323
<metaname="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-
<scriptsrc="{{static_root_path|safe}}{{files.storage_js}}"></script> {# #}
34+
<scriptsrc="{{static_root_path|safe}}{{files.storage_js}}"></script>
3535
{% if page.css_class.contains("crate") %}
36-
<scriptdefersrc="{{page.root_path|safe}}crates{{page.resource_suffix}}.js"></script> {# #}
36+
<scriptdefersrc="{{page.root_path|safe}}crates{{page.resource_suffix}}.js"></script>
3737
{% else if page.css_class == "src" %}
3838
<scriptdefersrc="{{static_root_path|safe}}{{files.src_script_js}}"></script> {# #}
39-
<scriptdefersrc="{{page.root_path|safe}}src-files{{page.resource_suffix}}.js"></script> {# #}
39+
<scriptdefersrc="{{page.root_path|safe}}src-files{{page.resource_suffix}}.js"></script>
4040
{% else if !page.css_class.contains("mod") %}
41-
<scriptdefersrc="sidebar-items{{page.resource_suffix}}.js"></script> {# #}
41+
<scriptdefersrc="sidebar-items{{page.resource_suffix}}.js"></script>
4242
{% else if !page.css_class.contains("sys") %}
43-
<scriptdefersrc="../sidebar-items{{page.resource_suffix}}.js"></script> {# #}
43+
<scriptdefersrc="../sidebar-items{{page.resource_suffix}}.js"></script>
4444
{% endif %}
45-
<scriptdefersrc="{{static_root_path|safe}}{{files.main_js}}"></script> {# #}
45+
<scriptdefersrc="{{static_root_path|safe}}{{files.main_js}}"></script>
4646
{% if layout.scrape_examples_extension %}
47-
<scriptdefersrc="{{static_root_path|safe}}{{files.scrape_examples_js}}"></script> {# #}
47+
<scriptdefersrc="{{static_root_path|safe}}{{files.scrape_examples_js}}"></script>
4848
{% endif %}
4949
<noscript> {# #}
5050
<linkrel="stylesheet" {#+#}
5151
href="{{static_root_path|safe}}{{files.noscript_css}}"> {# #}
52-
</noscript> {# #}
52+
</noscript>
5353
{% if layout.css_file_extension.is_some() %}
5454
<linkrel="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-
<linkrel="icon" href="{{layout.favicon}}"> {# #}
58+
<linkrel="icon" href="{{layout.favicon}}">
5959
{% else %}
6060
<linkrel="alternate icon" type="image/png" {#+#}
6161
href="{{static_root_path|safe}}{{files.rust_favicon_png_32}}"> {# #}
6262
<linkrel="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
<navclass="mobile-topbar"> {# #}
76-
<buttonclass="sidebar-menu-toggle" title="show sidebar"></button> {# #}
76+
<buttonclass="sidebar-menu-toggle" title="show sidebar"></button>
7777
{% if !layout.logo.is_empty() || page.rust_logo %}
78-
<aclass="logo-container" href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html"> {# #}
78+
<aclass="logo-container" href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html">
7979
{% if page.rust_logo %}
80-
<imgclass="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt=""> {# #}
80+
<imgclass="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="">
8181
{% else if !layout.logo.is_empty() %}
82-
<imgsrc="{{layout.logo}}" alt=""> {# #}
82+
<imgsrc="{{layout.logo}}" alt="">
8383
{% endif %}
84-
</a> {# #}
84+
</a>
8585
{% endif %}
8686
</nav>
8787
{% endif %}
88-
<navclass="sidebar"> {# #}
88+
<navclass="sidebar">
8989
{% if page.css_class != "src" %}
9090
<divclass="sidebar-crate">
9191
{% if !layout.logo.is_empty() || page.rust_logo %}
92-
<aclass="logo-container" href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html"> {# #}
92+
<aclass="logo-container" href="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html">
9393
{% if page.rust_logo %}
94-
<imgclass="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {# #}
94+
<imgclass="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo">
9595
{% else if !layout.logo.is_empty() %}
96-
<imgsrc="{{layout.logo}}" alt="logo"> {# #}
96+
<imgsrc="{{layout.logo}}" alt="logo">
9797
{% endif %}
98-
</a> {# #}
98+
</a>
9999
{% endif %}
100100
<h2> {# #}
101-
<ahref="{{page.root_path|safe}}{{display_krate_with_trailing_slash|safe}}index.html">{{display_krate|wrapped|safe}}</a> {# #}
101+
<ahref="{{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
<spanclass="version">{{+ display_krate_version_number}}</span>
104104
{% endif %}
105105
</h2> {# #}
106-
</div> {# #}
106+
</div>
107107
{% if !display_krate_version_extra.is_empty() %}
108-
<divclass="version">{{+ display_krate_version_extra}}</div> {# #}
108+
<divclass="version">{{+ display_krate_version_extra}}</div>
109109
{% endif %}
110110
{% else %}
111111
<divclass="src-sidebar-title"> {# #}
112112
<h2>Files</h2> {# #}
113-
</div> {# #}
113+
</div>
114114
{% endif %}
115115
{{ sidebar|safe }}
116116
</nav> {# #}
117117
<divclass="sidebar-resizer"></div> {# #}
118-
<main> {# #}
118+
<main>
119119
{% if page.css_class != "src" %}<divclass="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-
<sectionid="main-content" class="content">{{ content|safe }}</section> {# #}
123+
<sectionid="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/print_item.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<divclass="main-heading"> {# #}
1+
<divclass="main-heading">
22
{% if !path_components.is_empty() %}
33
<spanclass="rustdoc-breadcrumbs">
44
{% for (i, component) in path_components.iter().enumerate() %}

‎src/librustdoc/html/templates/short_item_info.html‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
<divclass="stab deprecated"> {# #}
44
<spanclass="emoji">👎</span> {# #}
55
<span>{{message|safe}}</span> {# #}
6-
</div> {# #}
6+
</div>
77
{% when Self::Unstable with { feature, tracking } %}
88
<divclass="stab unstable"> {# #}
99
<spanclass="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;<ahref="{{url}}{{num}}">#{{num}}</a> {# #}
15+
&nbsp;<ahref="{{url}}{{num}}">#{{num}}</a>
1616
{% when None %}
1717
{% endmatch %}
1818
) {# #}
1919
</span> {# #}
20-
</div> {# #}
20+
</div>
2121
{% when Self::Portability with { message } %}
22-
<divclass="stab portability">{{message|safe}}</div> {# #}
22+
<divclass="stab portability">{{message|safe}}</div>
2323
{% endmatch %}

‎src/librustdoc/html/templates/sidebar.html‎

Lines changed: 1 addition & 1 deletion
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 %}

‎src/librustdoc/html/templates/source.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ <h1> {# #}
99
</div>
1010
{% else %}
1111
{% endmatch %}
12-
<divclass="example-wrap"> {# #}
12+
<divclass="example-wrap">
1313
{# https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag#data-nosnippet-attr
1414
Do not show "1 2 3 4 5 ..." in web search results. #}
1515
<divdata-nosnippet><preclass="src-line-numbers">
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h2id="layout" class="section-header"> {# #}
22
Layout<ahref="#layout" class="anchor">§</a> {# #}
33
</h2> {# #}
4-
<divclass="docblock"> {# #}
4+
<divclass="docblock">
55
{% match type_layout_size %}
66
{% when Ok(type_layout_size) %}
77
<divclass="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)