diff options
| author | bors <bors@rust-lang.org> | 2022-11-25 13:01:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-25 13:01:45 +0000 |
| commit | e704e95250ff4e949214f390a88f21d08052bea1 (patch) | |
| tree | 440735e2d840925ef5a52fd8a7d4d3c0984d5d48 /src | |
| parent | 8a75c5a9b5d9c48aa576b08faf735b926d0d9a71 (diff) | |
| parent | f360686ed671576573f39c21d48e64cad603dd85 (diff) | |
| download | rust-e704e95250ff4e949214f390a88f21d08052bea1.tar.gz rust-e704e95250ff4e949214f390a88f21d08052bea1.zip | |
Auto merge of #104877 - matthiaskrgr:rollup-s7taiq8, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #103648 (Don't set `is_preview` for clippy and rustfmt) - #104654 (Add `#![deny(unsafe_op_in_unsafe_fn)]` in liballoc tests) - #104793 (unstable-book: Add page for the `abi_efiapi` feature) - #104841 (Assert that we don't capture escaping bound vars in `Fn` trait selection) - #104849 (Migrate source code elements style to CSS variables) - #104873 (RefCell::get_mut: fix typo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/dist.rs | 4 | ||||
| -rw-r--r-- | src/bootstrap/download.rs | 2 | ||||
| -rw-r--r-- | src/doc/unstable-book/src/language-features/abi-efiapi.md | 23 | ||||
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 7 | ||||
| -rw-r--r-- | src/librustdoc/html/static/css/themes/ayu.css | 8 | ||||
| -rw-r--r-- | src/librustdoc/html/static/css/themes/dark.css | 10 | ||||
| -rw-r--r-- | src/librustdoc/html/static/css/themes/light.css | 9 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/sidebar-source-code-display.goml | 44 | ||||
| -rw-r--r-- | src/tools/build-manifest/src/versions.rs | 4 | ||||
| -rw-r--r-- | src/tools/bump-stage0/src/main.rs | 2 | ||||
| -rw-r--r-- | src/tools/clippy/clippy_dev/src/setup/git_hook.rs | 2 | ||||
| -rw-r--r-- | src/tools/clippy/clippy_utils/src/hir_utils.rs | 2 |
12 files changed, 80 insertions, 37 deletions
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 2fef7f65827..a274d7b9aa1 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -1191,7 +1191,6 @@ impl Step for Clippy { let mut tarball = Tarball::new(builder, "clippy", &target.triple); tarball.set_overlay(OverlayKind::Clippy); - tarball.is_preview(true); tarball.add_file(clippy, "bin", 0o755); tarball.add_file(cargoclippy, "bin", 0o755); tarball.add_legal_and_readme_to("share/doc/clippy"); @@ -1289,7 +1288,6 @@ impl Step for Rustfmt { .expect("cargo fmt expected to build - essential tool"); let mut tarball = Tarball::new(builder, "rustfmt", &target.triple); tarball.set_overlay(OverlayKind::Rustfmt); - tarball.is_preview(true); tarball.add_file(rustfmt, "bin", 0o755); tarball.add_file(cargofmt, "bin", 0o755); tarball.add_legal_and_readme_to("share/doc/rustfmt"); @@ -1550,8 +1548,6 @@ impl Step for Extended { format!("{}-{}", name, target.triple) } else if name == "rust-analyzer" { "rust-analyzer-preview".to_string() - } else if name == "clippy" { - "clippy-preview".to_string() } else if name == "rust-demangler" { "rust-demangler-preview".to_string() } else if name == "miri" { diff --git a/src/bootstrap/download.rs b/src/bootstrap/download.rs index d0f389df973..430b3496d00 100644 --- a/src/bootstrap/download.rs +++ b/src/bootstrap/download.rs @@ -326,6 +326,8 @@ impl Config { } let filename = format!("rustfmt-{version}-{build}.tar.xz", build = host.triple); + // cfg(bootstrap): will need to be changed from `rustfmt-preview` to `rustfmt` the next time you run `bump-stage0`. + // See <https://github.com/rust-lang/rust/pull/103648> self.download_component(DownloadSource::Dist, filename, "rustfmt-preview", &date, "stage0"); self.fix_bin_or_dylib(&bin_root.join("bin").join("rustfmt")); diff --git a/src/doc/unstable-book/src/language-features/abi-efiapi.md b/src/doc/unstable-book/src/language-features/abi-efiapi.md new file mode 100644 index 00000000000..11ef0cfdb14 --- /dev/null +++ b/src/doc/unstable-book/src/language-features/abi-efiapi.md @@ -0,0 +1,23 @@ +# `abi_efiapi` + +The tracking issue for this feature is: [#65815] + +[#65815]: https://github.com/rust-lang/rust/issues/65815 + +------------------------ + +The `efiapi` calling convention can be used for defining a function with +an ABI compatible with the UEFI Interfaces as defined in the [UEFI +Specification]. + +Example: + +```rust +#![feature(abi_efiapi)] + +extern "efiapi" { fn f1(); } + +extern "efiapi" fn f2() { todo!() } +``` + +[UEFI Specification]: https://uefi.org/specs/UEFI/2.10/ diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 9b07fc90f6f..c1f7a833834 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -1343,6 +1343,13 @@ a.test-arrow:hover { border-bottom: 1px solid var(--border-color); margin-bottom: 6px; } +#source-sidebar div.files > a:hover, details.dir-entry summary:hover, +#source-sidebar div.files > a:focus, details.dir-entry summary:focus { + background-color: var(--source-sidebar-background-hover); +} +#source-sidebar div.files > a.selected { + background-color: var(--source-sidebar-background-selected); +} #sidebar-toggle > button { font-size: inherit; font-weight: bold; diff --git a/src/librustdoc/html/static/css/themes/ayu.css b/src/librustdoc/html/static/css/themes/ayu.css index eb66377670c..de7db7d438c 100644 --- a/src/librustdoc/html/static/css/themes/ayu.css +++ b/src/librustdoc/html/static/css/themes/ayu.css @@ -84,6 +84,8 @@ Original by Dempfi (https://github.com/dempfi/ayu) --crate-search-div-hover-filter: invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%); --crate-search-hover-border: #e0e0e0; + --source-sidebar-background-selected: #14191f; + --source-sidebar-background-hover: #14191f; } h1, h2, h3, h4 { @@ -208,12 +210,8 @@ pre.rust .kw-2, pre.rust .prelude-ty {} color: #fff; } #source-sidebar div.files > a:hover, details.dir-entry summary:hover, -#source-sidebar div.files > a:focus, details.dir-entry summary:focus { - background-color: #14191f; - color: #ffb44c; -} +#source-sidebar div.files > a:focus, details.dir-entry summary:focus, #source-sidebar div.files > a.selected { - background-color: #14191f; color: #ffb44c; } diff --git a/src/librustdoc/html/static/css/themes/dark.css b/src/librustdoc/html/static/css/themes/dark.css index 44598a6b778..d8929f32338 100644 --- a/src/librustdoc/html/static/css/themes/dark.css +++ b/src/librustdoc/html/static/css/themes/dark.css @@ -79,6 +79,8 @@ --crate-search-div-hover-filter: invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%); --crate-search-hover-border: #2196f3; + --source-sidebar-background-selected: #333; + --source-sidebar-background-hover: #444; } .content .item-info::before { color: #ccc; } @@ -105,14 +107,6 @@ details.rustdoc-toggle > summary::before { color: #888; } -#source-sidebar div.files > a:hover, details.dir-entry summary:hover, -#source-sidebar div.files > a:focus, details.dir-entry summary:focus { - background-color: #444; -} -#source-sidebar div.files > a.selected { - background-color: #333; -} - .scraped-example-list .scrape-help { border-color: #aaa; color: #eee; diff --git a/src/librustdoc/html/static/css/themes/light.css b/src/librustdoc/html/static/css/themes/light.css index f0db14fd59f..ff6c6863533 100644 --- a/src/librustdoc/html/static/css/themes/light.css +++ b/src/librustdoc/html/static/css/themes/light.css @@ -76,6 +76,8 @@ --crate-search-div-hover-filter: invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%); --crate-search-hover-border: #717171; + --source-sidebar-background-selected: #fff; + --source-sidebar-background-hover: #e0e0e0; } .content .item-info::before { color: #ccc; } @@ -98,13 +100,6 @@ body.source .example-wrap pre.rust a { color: #888; } -#source-sidebar div.files > a:hover, details.dir-entry summary:hover, -#source-sidebar div.files > a:focus, details.dir-entry summary:focus { - background-color: #E0E0E0; -} -#source-sidebar div.files > a.selected { - background-color: #fff; -} .scraped-example-list .scrape-help { border-color: #555; color: #333; diff --git a/src/test/rustdoc-gui/sidebar-source-code-display.goml b/src/test/rustdoc-gui/sidebar-source-code-display.goml index abf8af77715..40ae4af81be 100644 --- a/src/test/rustdoc-gui/sidebar-source-code-display.goml +++ b/src/test/rustdoc-gui/sidebar-source-code-display.goml @@ -43,16 +43,24 @@ define-function: ( "#source-sidebar details[open] > .files a.selected", {"color": |color_hover|, "background-color": |background|}, )), + // Without hover or focus. ("assert-css", ("#sidebar-toggle > button", {"background-color": |background_toggle|})), // With focus. ("focus", "#sidebar-toggle > button"), - ("assert-css", ("#sidebar-toggle > button", {"background-color": |background_toggle_hover|})), + ("assert-css", ( + "#sidebar-toggle > button:focus", + {"background-color": |background_toggle_hover|}, + )), ("focus", ".search-input"), // With hover. ("move-cursor-to", "#sidebar-toggle > button"), - ("assert-css", ("#sidebar-toggle > button", {"background-color": |background_toggle_hover|})), - // Without hover. + ("assert-css", ( + "#sidebar-toggle > button:hover", + {"background-color": |background_toggle_hover|}, + )), + + // Without hover or focus. ("assert-css", ( "#source-sidebar details[open] > .files a:not(.selected)", {"color": |color|, "background-color": |background_toggle|}, @@ -60,17 +68,37 @@ define-function: ( // With focus. ("focus", "#source-sidebar details[open] > .files a:not(.selected)"), ("wait-for-css", ( - "#source-sidebar details[open] > .files a:not(.selected)", + "#source-sidebar details[open] > .files a:not(.selected):focus", {"color": |color_hover|, "background-color": |background_hover|}, )), ("focus", ".search-input"), // With hover. ("move-cursor-to", "#source-sidebar details[open] > .files a:not(.selected)"), ("assert-css", ( - "#source-sidebar details[open] > .files a:not(.selected)", + "#source-sidebar details[open] > .files a:not(.selected):hover", {"color": |color_hover|, "background-color": |background_hover|}, )), - // Without hover. + + // Without hover or focus. + ("assert-css", ( + "#source-sidebar .dir-entry summary", + {"color": |color|, "background-color": |background_toggle|}, + )), + // With focus. + ("focus", "#source-sidebar .dir-entry summary"), + ("wait-for-css", ( + "#source-sidebar .dir-entry summary:focus", + {"color": |color_hover|, "background-color": |background_hover|}, + )), + ("focus", ".search-input"), + // With hover. + ("move-cursor-to", "#source-sidebar .dir-entry summary"), + ("assert-css", ( + "#source-sidebar .dir-entry summary:hover", + {"color": |color_hover|, "background-color": |background_hover|}, + )), + + // Without hover or focus. ("assert-css", ( "#source-sidebar details[open] > .folders > details > summary", {"color": |color|, "background-color": |background_toggle|}, @@ -78,14 +106,14 @@ define-function: ( // With focus. ("focus", "#source-sidebar details[open] > .folders > details > summary"), ("wait-for-css", ( - "#source-sidebar details[open] > .folders > details > summary", + "#source-sidebar details[open] > .folders > details > summary:focus", {"color": |color_hover|, "background-color": |background_hover|}, )), ("focus", ".search-input"), // With hover. ("move-cursor-to", "#source-sidebar details[open] > .folders > details > summary"), ("assert-css", ( - "#source-sidebar details[open] > .folders > details > summary", + "#source-sidebar details[open] > .folders > details > summary:hover", {"color": |color_hover|, "background-color": |background_hover|}, )), ], diff --git a/src/tools/build-manifest/src/versions.rs b/src/tools/build-manifest/src/versions.rs index dde9745afb7..66e6982d6b4 100644 --- a/src/tools/build-manifest/src/versions.rs +++ b/src/tools/build-manifest/src/versions.rs @@ -49,10 +49,10 @@ pkg_type! { Cargo = "cargo", HtmlDocs = "rust-docs", RustAnalysis = "rust-analysis", + Clippy = "clippy", + Rustfmt = "rustfmt", Rls = "rls"; preview = true, RustAnalyzer = "rust-analyzer"; preview = true, - Clippy = "clippy"; preview = true, - Rustfmt = "rustfmt"; preview = true, LlvmTools = "llvm-tools"; preview = true, Miri = "miri"; preview = true, JsonDocs = "rust-docs-json"; preview = true, diff --git a/src/tools/bump-stage0/src/main.rs b/src/tools/bump-stage0/src/main.rs index aa346daf7e5..388203ee463 100644 --- a/src/tools/bump-stage0/src/main.rs +++ b/src/tools/bump-stage0/src/main.rs @@ -6,7 +6,7 @@ use std::convert::TryInto; const PATH: &str = "src/stage0.json"; const COMPILER_COMPONENTS: &[&str] = &["rustc", "rust-std", "cargo"]; -const RUSTFMT_COMPONENTS: &[&str] = &["rustfmt-preview"]; +const RUSTFMT_COMPONENTS: &[&str] = &["rustfmt"]; struct Tool { config: Config, diff --git a/src/tools/clippy/clippy_dev/src/setup/git_hook.rs b/src/tools/clippy/clippy_dev/src/setup/git_hook.rs index 1de5b1940ba..c7c53bc69d0 100644 --- a/src/tools/clippy/clippy_dev/src/setup/git_hook.rs +++ b/src/tools/clippy/clippy_dev/src/setup/git_hook.rs @@ -6,7 +6,7 @@ use super::verify_inside_clippy_dir; /// Rusts setup uses `git rev-parse --git-common-dir` to get the root directory of the repo. /// I've decided against this for the sake of simplicity and to make sure that it doesn't install /// the hook if `clippy_dev` would be used in the rust tree. The hook also references this tool -/// for formatting and should therefor only be used in a normal clone of clippy +/// for formatting and should therefore only be used in a normal clone of clippy const REPO_GIT_DIR: &str = ".git"; const HOOK_SOURCE_FILE: &str = "util/etc/pre-commit.sh"; const HOOK_TARGET_FILE: &str = ".git/hooks/pre-commit"; diff --git a/src/tools/clippy/clippy_utils/src/hir_utils.rs b/src/tools/clippy/clippy_utils/src/hir_utils.rs index 0231a51adf4..c944fc51e82 100644 --- a/src/tools/clippy/clippy_utils/src/hir_utils.rs +++ b/src/tools/clippy/clippy_utils/src/hir_utils.rs @@ -113,7 +113,7 @@ impl HirEqInterExpr<'_, '_, '_> { } } - // eq_pat adds the HirIds to the locals map. We therefor call it last to make sure that + // eq_pat adds the HirIds to the locals map. We therefore call it last to make sure that // these only get added if the init and type is equal. both(&l.init, &r.init, |l, r| self.eq_expr(l, r)) && both(&l.ty, &r.ty, |l, r| self.eq_ty(l, r)) |
