diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/CHANGELOG.md | 1 | ||||
| -rw-r--r-- | src/bootstrap/config.rs | 4 | ||||
| -rwxr-xr-x | src/bootstrap/configure.py | 1 | ||||
| -rw-r--r-- | src/bootstrap/native.rs | 4 | ||||
| -rw-r--r-- | src/doc/unstable-book/src/compiler-flags/cf-protection.md | 4 | ||||
| -rw-r--r-- | src/librustdoc/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/librustdoc/askama.toml | 1 | ||||
| -rw-r--r-- | src/librustdoc/html/templates/STYLE.md | 27 | ||||
| -rw-r--r-- | src/librustdoc/html/templates/page.html | 294 | ||||
| -rw-r--r-- | src/librustdoc/html/templates/print_item.html | 52 |
10 files changed, 194 insertions, 196 deletions
diff --git a/src/bootstrap/CHANGELOG.md b/src/bootstrap/CHANGELOG.md index 4105fa5ec96..648eb553c78 100644 --- a/src/bootstrap/CHANGELOG.md +++ b/src/bootstrap/CHANGELOG.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - `remote-test-server`'s `verbose` argument has been removed in favor of the `--verbose` flag - `remote-test-server`'s `remote` argument has been removed in favor of the `--bind` flag. Use `--bind 0.0.0.0:12345` to replicate the behavior of the `remote` argument. - `x.py fmt` now formats only files modified between the merge-base of HEAD and the last commit in the master branch of the rust-lang repository and the current working directory. To restore old behaviour, use `x.py fmt .`. The check mode is not affected by this change. [#105702](https://github.com/rust-lang/rust/pull/105702) +- The `llvm.version-check` config option has been removed. Older versions were never supported. If you still need to support older versions (e.g. you are applying custom patches), patch `check_llvm_version` in bootstrap to change the minimum version. [#108619](https://github.com/rust-lang/rust/pull/108619) ### Non-breaking changes diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index bf1aff7b72f..6e64bc20d20 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -118,7 +118,6 @@ pub struct Config { pub llvm_optimize: bool, pub llvm_thin_lto: bool, pub llvm_release_debuginfo: bool, - pub llvm_version_check: bool, pub llvm_static_stdcpp: bool, /// `None` if `llvm_from_ci` is true and we haven't yet downloaded llvm. #[cfg(not(test))] @@ -672,7 +671,6 @@ define_config! { tests: Option<bool> = "tests", plugins: Option<bool> = "plugins", ccache: Option<StringOrBool> = "ccache", - version_check: Option<bool> = "version-check", static_libstdcpp: Option<bool> = "static-libstdcpp", ninja: Option<bool> = "ninja", targets: Option<String> = "targets", @@ -804,7 +802,6 @@ impl Config { let mut config = Config::default(); config.llvm_optimize = true; config.ninja_in_file = true; - config.llvm_version_check = true; config.llvm_static_stdcpp = false; config.backtrace = true; config.rust_optimize = true; @@ -1166,7 +1163,6 @@ impl Config { set(&mut config.llvm_optimize, llvm.optimize); set(&mut config.llvm_thin_lto, llvm.thin_lto); set(&mut config.llvm_release_debuginfo, llvm.release_debuginfo); - set(&mut config.llvm_version_check, llvm.version_check); set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp); if let Some(v) = llvm.link_shared { config.llvm_link_shared.set(Some(v)); diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index c0d382d8a50..5278f0c10b3 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -44,7 +44,6 @@ o("local-rebuild", "build.local-rebuild", "assume local-rust matches the current o("llvm-static-stdcpp", "llvm.static-libstdcpp", "statically link to libstdc++ for LLVM") o("llvm-link-shared", "llvm.link-shared", "prefer shared linking to LLVM (llvm-config --link-shared)") o("rpath", "rust.rpath", "build rpaths into rustc itself") -o("llvm-version-check", "llvm.version-check", "check if the LLVM version is supported, build anyway") o("codegen-tests", "rust.codegen-tests", "run the tests/codegen tests") o("option-checking", None, "complain about unrecognized options in this configure script") o("ninja", "llvm.ninja", "build LLVM using the Ninja generator (for MSVC, requires building in the correct environment)") diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 8453a25f38a..909e7d83a15 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -520,10 +520,6 @@ impl Step for Llvm { } fn check_llvm_version(builder: &Builder<'_>, llvm_config: &Path) { - if !builder.config.llvm_version_check { - return; - } - if builder.config.dry_run() { return; } diff --git a/src/doc/unstable-book/src/compiler-flags/cf-protection.md b/src/doc/unstable-book/src/compiler-flags/cf-protection.md index ab698c82ba9..efe5f5642b8 100644 --- a/src/doc/unstable-book/src/compiler-flags/cf-protection.md +++ b/src/doc/unstable-book/src/compiler-flags/cf-protection.md @@ -1,5 +1,9 @@ # `cf-protection` +The tracking issue for this feature is: [#93754](https://github.com/rust-lang/rust/issues/93754). + +------------------------ + This option enables control-flow enforcement technology (CET) on x86; a more detailed description of CET is available [here]. Similar to `clang`, this flag takes one of the following values: diff --git a/src/librustdoc/Cargo.toml b/src/librustdoc/Cargo.toml index c48f7998c5a..6ca6edfd3c9 100644 --- a/src/librustdoc/Cargo.toml +++ b/src/librustdoc/Cargo.toml @@ -8,7 +8,7 @@ path = "lib.rs" [dependencies] arrayvec = { version = "0.7", default-features = false } -askama = { version = "0.11", default-features = false, features = ["config"] } +askama = { version = "0.12", default-features = false, features = ["config"] } itertools = "0.10.1" minifier = "0.2.2" once_cell = "1.10.0" diff --git a/src/librustdoc/askama.toml b/src/librustdoc/askama.toml index 0c984f637ba..2732c4bc61e 100644 --- a/src/librustdoc/askama.toml +++ b/src/librustdoc/askama.toml @@ -1,2 +1,3 @@ [general] dirs = ["html/templates"] +whitespace = "suppress" diff --git a/src/librustdoc/html/templates/STYLE.md b/src/librustdoc/html/templates/STYLE.md index fff65e3b5ff..72c516c93eb 100644 --- a/src/librustdoc/html/templates/STYLE.md +++ b/src/librustdoc/html/templates/STYLE.md @@ -10,28 +10,29 @@ similar to [Jinja2](jinjadoc) and [Django](djangodoc) templates, and also to [As We want our rendered output to have as little unnecessary whitespace as possible, so that pages load quickly. To achieve that we use Tera's -[whitespace control] features. At the end of most lines, we put an empty comment -tag with the whitespace control characters: `{#- -#}`. This causes all -whitespace between the end of the line and the beginning of the next, including -indentation, to be omitted on render. Sometimes we want to preserve a single -space. In those cases we put the space at the end of the line, followed by -`{# -#}`, which is a directive to remove following whitespace but not preceding. -We also use the whitespace control characters in most instances of tags with -control flow, for example `{%- if foo -%}`. +[whitespace control] features. By default, whitespace characters are removed +around jinja tags (`{% %}` for example). At the end of most lines, we put an +empty comment tag: `{# #}`. This causes all whitespace between the end of the +line and the beginning of the next, including indentation, to be omitted on +render. Sometimes we want to preserve a single space. In those cases we put the +space at the end of the line, followed by `{#+ #}`, which is a directive to +remove following whitespace but not preceding. We also use the whitespace +control characters in most instances of tags with control flow, for example +`{% if foo %}`. [whitespace control]: https://tera.netlify.app/docs/#whitespace-control We want our templates to be readable, so we use indentation and newlines -liberally. We indent by four spaces after opening an HTML tag _or_ a Tera +liberally. We indent by four spaces after opening an HTML tag _or_ a Jinja tag. In most cases an HTML tag should be followed by a newline, but if the tag has simple contents and fits with its close tag on a single line, the contents don't necessarily need a new line. -Tera templates support quite sophisticated control flow. To keep our templates +Askama templates support quite sophisticated control flow. To keep our templates simple and understandable, we use only a subset: `if` and `for`. In particular -we avoid [assignments in the template logic](assignments) and [Tera +we avoid [assignments in the template logic](assignments) and [Askama macros](macros). This also may make things easier if we switch to a different Jinja-style template system, like Askama, in the future. -[assignments]: https://tera.netlify.app/docs/#assignments -[macros]: https://tera.netlify.app/docs/#macros +[assignments]: https://djc.github.io/askama/template_syntax.html#assignments +[macros]: https://djc.github.io/askama/template_syntax.html#macros diff --git a/src/librustdoc/html/templates/page.html b/src/librustdoc/html/templates/page.html index 7690d8f251f..e896850fab6 100644 --- a/src/librustdoc/html/templates/page.html +++ b/src/librustdoc/html/templates/page.html @@ -1,148 +1,148 @@ -<!DOCTYPE html> {#- -#} -<html lang="en"> {#- -#} -<head> {#- -#} - <meta charset="utf-8"> {#- -#} - <meta name="viewport" content="width=device-width, initial-scale=1.0"> {#- -#} - <meta name="generator" content="rustdoc"> {#- -#} - <meta name="description" content="{{page.description}}"> {#- -#} - <title>{{page.title}}</title> {#- -#} - <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_serif_4_regular}}"> {#- -#} - <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.fira_sans_regular}}"> {#- -#} - <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.fira_sans_medium}}"> {#- -#} - <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_code_pro_regular}}"> {#- -#} - <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_serif_4_bold}}"> {#- -#} - <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_code_pro_semibold}}"> {#- -#} - <link rel="stylesheet" {# -#} - href="{{static_root_path|safe}}{{files.normalize_css}}"> {#- -#} - <link rel="stylesheet" {# -#} - href="{{static_root_path|safe}}{{files.rustdoc_css}}" {# -#} - id="mainThemeStyle"> {#- -#} - <link rel="stylesheet" id="themeStyle" href="{{static_root_path|safe}}{{files.theme_light_css}}"> {#- -#} - <link rel="stylesheet" disabled href="{{static_root_path|safe}}{{files.theme_dark_css}}"> {#- -#} - <link rel="stylesheet" disabled href="{{static_root_path|safe}}{{files.theme_ayu_css}}"> {#- -#} - {%- for theme in themes -%} - <link rel="stylesheet" disabled href="{{page.root_path|safe}}{{theme}}{{page.resource_suffix}}.css"> {#- -#} - {%- endfor -%} - {%- if !layout.default_settings.is_empty() -%} - <script id="default-settings" {# -#} - {% for (k, v) in layout.default_settings %} +<!DOCTYPE html> {# #} +<html lang="en"> {# #} +<head> {# #} + <meta charset="utf-8"> {# #} + <meta name="viewport" content="width=device-width, initial-scale=1.0"> {# #} + <meta name="generator" content="rustdoc"> {# #} + <meta name="description" content="{{page.description}}"> {# #} + <title>{{page.title}}</title> {# #} + <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_serif_4_regular}}"> {# #} + <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.fira_sans_regular}}"> {# #} + <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.fira_sans_medium}}"> {# #} + <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_code_pro_regular}}"> {# #} + <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_serif_4_bold}}"> {# #} + <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_code_pro_semibold}}"> {# #} + <link rel="stylesheet" {#+ #} + href="{{static_root_path|safe}}{{files.normalize_css}}"> {# #} + <link rel="stylesheet" {#+ #} + href="{{static_root_path|safe}}{{files.rustdoc_css}}" {#+ #} + id="mainThemeStyle"> {# #} + <link rel="stylesheet" id="themeStyle" href="{{static_root_path|safe}}{{files.theme_light_css}}"> {# #} + <link rel="stylesheet" disabled href="{{static_root_path|safe}}{{files.theme_dark_css}}"> {# #} + <link rel="stylesheet" disabled href="{{static_root_path|safe}}{{files.theme_ayu_css}}"> {# #} + {% for theme in themes %} + <link rel="stylesheet" disabled href="{{page.root_path|safe}}{{theme}}{{page.resource_suffix}}.css"> {# #} + {% endfor %} + {% if !layout.default_settings.is_empty() %} + <script id="default-settings" {#+ #} + {%~ for (k, v) in layout.default_settings ~%} data-{{k}}="{{v}}" - {%- endfor -%} - ></script> {#- -#} - {%- endif -%} - <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> {#- -#} - {%- else if page.css_class == "source" -%} - <script defer src="{{static_root_path|safe}}{{files.source_script_js}}"></script> {#- -#} - <script defer src="{{page.root_path|safe}}source-files{{page.resource_suffix}}.js"></script> {#- -#} - {%- else if !page.css_class.contains("mod") -%} - <script defer src="sidebar-items{{page.resource_suffix}}.js"></script> {#- -#} - {%- endif -%} - <script defer src="{{static_root_path|safe}}{{files.main_js}}"></script> {#- -#} - {%- if layout.scrape_examples_extension -%} - <script defer src="{{static_root_path|safe}}{{files.scrape_examples_js}}"></script> {#- -#} - {%- endif -%} - <noscript> {#- -#} - <link rel="stylesheet" {# -#} - href="{{static_root_path|safe}}{{files.noscript_css}}"> {#- -#} - </noscript> {#- -#} - {%- if layout.css_file_extension.is_some() -%} - <link rel="stylesheet" {# -#} - href="{{static_root_path|safe}}theme{{page.resource_suffix}}.css"> {#- -#} - {%- endif -%} - {%- if !layout.favicon.is_empty() -%} - <link rel="icon" href="{{layout.favicon}}"> {#- -#} - {%- else -%} - <link rel="alternate icon" type="image/png" {# -#} - href="{{static_root_path|safe}}{{files.rust_favicon_png_16}}"> {#- -#} - <link rel="alternate icon" type="image/png" {# -#} - href="{{static_root_path|safe}}{{files.rust_favicon_png_32}}"> {#- -#} - <link rel="icon" type="image/svg+xml" {# -#} - href="{{static_root_path|safe}}{{files.rust_favicon_svg}}"> {#- -#} - {%- endif -%} - {{- layout.external_html.in_header|safe -}} -</head> {#- -#} -<body class="rustdoc {{page.css_class}}"> {#- -#} - <!--[if lte IE 11]> {#- -#} - <div class="warning"> {#- -#} - This old browser is unsupported and will most likely display funky things. {#- -#} - </div> {#- -#} - <![endif]--> {#- -#} - {{- layout.external_html.before_content|safe -}} - {%- if page.css_class != "source" -%} - <nav class="mobile-topbar"> {#- -#} - <button class="sidebar-menu-toggle">☰</button> {#- -#} - <a class="logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#} - {%- if !layout.logo.is_empty() -%} - <img src="{{layout.logo}}" alt="logo"> {#- -#} - {%- else -%} - <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {#- -#} - {%- endif -%} - </a> {#- -#} - <h2></h2> {#- -#} - </nav> {#- -#} - {%- endif -%} - <nav class="sidebar"> {#- -#} - {%- if page.css_class != "source" -%} - <a class="logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#} - {%- if !layout.logo.is_empty() %} - <img src="{{layout.logo}}" alt="logo"> {#- -#} - {%- else -%} - <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {#- -#} - {%- endif -%} - </a> {#- -#} - {%- endif -%} - {{- sidebar|safe -}} - </nav> {#- -#} - <main> {#- -#} - {%- if page.css_class != "source" -%}<div class="width-limiter">{%- endif -%} - <nav class="sub"> {#- -#} - {%- if page.css_class == "source" -%} - <a class="sub-logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#} - {%- if !layout.logo.is_empty() %} - <img src="{{layout.logo}}" alt="logo"> {#- -#} - {%- else -%} - <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {#- -#} - {%- endif -%} - </a> {#- -#} - {%- endif -%} - <form class="search-form"> {#- -#} - <span></span> {#- This empty span is a hacky fix for Safari - See #93184 -#} - <input {# -#} - class="search-input" {# -#} - name="search" {# -#} - aria-label="Run search in the documentation" {# -#} - autocomplete="off" {# -#} - spellcheck="false" {# -#} - placeholder="Click or press ‘S’ to search, ‘?’ for more options…" {# -#} - type="search"> {#- -#} - <div id="help-button" title="help" tabindex="-1"> {#- -#} - <a href="{{page.root_path|safe}}help.html">?</a> {#- -#} - </div> {#- -#} - <div id="settings-menu" tabindex="-1"> {#- -#} - <a href="{{page.root_path|safe}}settings.html" title="settings"> {#- -#} - <img width="22" height="22" alt="Change settings" {# -#} - src="{{static_root_path|safe}}{{files.wheel_svg}}"> {#- -#} - </a> {#- -#} - </div> {#- -#} - </form> {#- -#} - </nav> {#- -#} - <section id="main-content" class="content">{{- content|safe -}}</section> {#- -#} - {%- if page.css_class != "source" -%}</div>{%- endif -%} - </main> {#- -#} - {{- layout.external_html.after_content|safe -}} - <div id="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-search-js="{{files.search_js}}" {# -#} - data-settings-js="{{files.settings_js}}" {# -#} - data-settings-css="{{files.settings_css}}" {# -#} - > {#- -#} - </div> {#- -#} -</body> {#- -#} -</html> {#- -#} + {% endfor %} + ></script> {# #} + {% endif %} + <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> {# #} + {% else if page.css_class == "source" %} + <script defer src="{{static_root_path|safe}}{{files.source_script_js}}"></script> {# #} + <script defer src="{{page.root_path|safe}}source-files{{page.resource_suffix}}.js"></script> {# #} + {% else if !page.css_class.contains("mod") %} + <script defer src="sidebar-items{{page.resource_suffix}}.js"></script> {# #} + {% endif %} + <script defer src="{{static_root_path|safe}}{{files.main_js}}"></script> {# #} + {% if layout.scrape_examples_extension %} + <script defer src="{{static_root_path|safe}}{{files.scrape_examples_js}}"></script> {# #} + {% endif %} + <noscript> {# #} + <link rel="stylesheet" {#+ #} + href="{{static_root_path|safe}}{{files.noscript_css}}"> {# #} + </noscript> {# #} + {% if layout.css_file_extension.is_some() %} + <link rel="stylesheet" {#+ #} + href="{{static_root_path|safe}}theme{{page.resource_suffix}}.css"> {# #} + {% endif %} + {% if !layout.favicon.is_empty() %} + <link rel="icon" href="{{layout.favicon}}"> {# #} + {% else %} + <link rel="alternate icon" type="image/png" {#+ #} + href="{{static_root_path|safe}}{{files.rust_favicon_png_16}}"> {# #} + <link rel="alternate icon" type="image/png" {#+ #} + href="{{static_root_path|safe}}{{files.rust_favicon_png_32}}"> {# #} + <link rel="icon" type="image/svg+xml" {#+ #} + href="{{static_root_path|safe}}{{files.rust_favicon_svg}}"> {# #} + {% endif %} + {{ layout.external_html.in_header|safe }} +</head> {# #} +<body class="rustdoc {{+page.css_class}}"> {# #} + <!--[if lte IE 11]> {# #} + <div class="warning"> {# #} + This old browser is unsupported and will most likely display funky things. {# #} + </div> {# #} + <![endif]--> {# #} + {{ layout.external_html.before_content|safe }} + {% if page.css_class != "source" %} + <nav class="mobile-topbar"> {# #} + <button class="sidebar-menu-toggle">☰</button> {# #} + <a class="logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {# #} + {% if !layout.logo.is_empty() %} + <img src="{{layout.logo}}" alt="logo"> {# #} + {% else %} + <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {# #} + {% endif %} + </a> {# #} + <h2></h2> {# #} + </nav> {# #} + {% endif %} + <nav class="sidebar"> {# #} + {% if page.css_class != "source" %} + <a class="logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {# #} + {% if !layout.logo.is_empty() %} + <img src="{{layout.logo}}" alt="logo"> {# #} + {% else %} + <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {# #} + {% endif %} + </a> {# #} + {% endif %} + {{ sidebar|safe }} + </nav> {# #} + <main> {# #} + {% if page.css_class != "source" %}<div class="width-limiter">{% endif %} + <nav class="sub"> {# #} + {% if page.css_class == "source" %} + <a class="sub-logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {# #} + {% if !layout.logo.is_empty() %} + <img src="{{layout.logo}}" alt="logo"> {# #} + {% else %} + <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {# #} + {% endif %} + </a> {# #} + {% endif %} + <form class="search-form"> {# #} + <span></span> {# This empty span is a hacky fix for Safari - See #93184 #} + <input {#+ #} + class="search-input" {#+ #} + name="search" {#+ #} + aria-label="Run search in the documentation" {#+ #} + autocomplete="off" {#+ #} + spellcheck="false" {#+ #} + placeholder="Click or press ‘S’ to search, ‘?’ for more options…" {#+ #} + type="search"> {# #} + <div id="help-button" title="help" tabindex="-1"> {# #} + <a href="{{page.root_path|safe}}help.html">?</a> {# #} + </div> {# #} + <div id="settings-menu" tabindex="-1"> {# #} + <a href="{{page.root_path|safe}}settings.html" title="settings"> {# #} + <img width="22" height="22" alt="Change settings" {#+ #} + src="{{static_root_path|safe}}{{files.wheel_svg}}"> {# #} + </a> {# #} + </div> {# #} + </form> {# #} + </nav> {# #} + <section id="main-content" class="content">{{ content|safe }}</section> {# #} + {% if page.css_class != "source" %}</div>{% endif %} + </main> {# #} + {{ layout.external_html.after_content|safe }} + <div id="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-search-js="{{files.search_js}}" {#+ #} + data-settings-js="{{files.settings_js}}" {#+ #} + data-settings-css="{{files.settings_css}}" {#+ #} + > {# #} + </div> {# #} +</body> {# #} +</html> {# #} diff --git a/src/librustdoc/html/templates/print_item.html b/src/librustdoc/html/templates/print_item.html index 3a1867b7feb..edabac9a082 100644 --- a/src/librustdoc/html/templates/print_item.html +++ b/src/librustdoc/html/templates/print_item.html @@ -1,28 +1,28 @@ -<div class="main-heading"> {#- -#} - <h1> {#- -#} - {{-typ-}} - {#- The breadcrumbs of the item path, like std::string -#} - {%- for component in path_components -%} - <a href="{{component.path|safe}}index.html">{{component.name}}</a>::<wbr> - {%- endfor -%} - <a class="{{item_type}}" href="#">{{name}}</a> {#- -#} - <button id="copy-path" title="Copy item path to clipboard"> {#- -#} - <img src="{{static_root_path|safe}}{{clipboard_svg}}" {# -#} - width="19" height="18" {# -#} - alt="Copy item path"> {#- -#} - </button> {#- -#} - </h1> {#- -#} - <span class="out-of-band"> {#- -#} +<div class="main-heading"> {# #} + <h1> {# #} + {{typ}} + {# The breadcrumbs of the item path, like std::string #} + {% for component in path_components %} + <a href="{{component.path|safe}}index.html">{{component.name}}</a>::<wbr> + {% endfor %} + <a class="{{item_type}}" href="#">{{name}}</a> {# #} + <button id="copy-path" title="Copy item path to clipboard"> {# #} + <img src="{{static_root_path|safe}}{{clipboard_svg}}" {#+ #} + width="19" height="18" {#+ #} + alt="Copy item path"> {# #} + </button> {# #} + </h1> {# #} + <span class="out-of-band"> {# #} {% if !stability_since_raw.is_empty() %} - {{- stability_since_raw|safe }} · {# -#} + {{ stability_since_raw|safe +}} · {#+ #} {% endif %} - {%- match src_href -%} - {%- when Some with (href) -%} - <a class="srclink" href="{{href|safe}}">source</a> · {# -#} - {%- else -%} - {%- endmatch -%} - <button id="toggle-all-docs" title="collapse all docs"> {#- -#} - [<span>−</span>] {#- -#} - </button> {#- -#} - </span> {#- -#} -</div> {#- -#} + {% match src_href %} + {% when Some with (href) %} + <a class="srclink" href="{{href|safe}}">source</a> · {#+ #} + {% else %} + {% endmatch %} + <button id="toggle-all-docs" title="collapse all docs"> {# #} + [<span>−</span>] {# #} + </button> {# #} + </span> {# #} +</div> {# #} |
