diff options
| author | bors <bors@rust-lang.org> | 2021-05-20 18:30:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-05-20 18:30:26 +0000 |
| commit | 99e3aef02079e9c10583638520cd0c134dc3a01d (patch) | |
| tree | 5e9f3cb53bb3cd75c4e69e85c3a2cf465ab48b6b /src | |
| parent | 9a3214e9be41a5d50ae6ba9bb8422dcc2cb10473 (diff) | |
| parent | 247e2e24ebd427ddeb254cec9337de2803adfa0a (diff) | |
| download | rust-99e3aef02079e9c10583638520cd0c134dc3a01d.tar.gz rust-99e3aef02079e9c10583638520cd0c134dc3a01d.zip | |
Auto merge of #85518 - GuillaumeGomez:rollup-mq4ohfy, r=GuillaumeGomez
Rollup of 5 pull requests Successful merges: - #85275 (Move `std::memchr` to `sys_common`) - #85326 (bootstrap: ensure host std when cross-compiling tools, fixes #85320) - #85375 (Fix missing lifetimes diagnostics after #83759) - #85507 (Extend escape key check) - #85509 (Prevent tab title to "null" if the URL is a search one) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/tool.rs | 5 | ||||
| -rw-r--r-- | src/librustdoc/html/static/main.js | 2 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/escape-key.goml | 13 | ||||
| -rw-r--r-- | src/test/ui/suggestions/issue-85347.rs | 10 | ||||
| -rw-r--r-- | src/test/ui/suggestions/issue-85347.stderr | 19 |
5 files changed, 44 insertions, 5 deletions
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index dd8c6023a44..98b5bfd3b98 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -52,7 +52,10 @@ impl Step for ToolBuild { let is_optional_tool = self.is_optional_tool; match self.mode { - Mode::ToolRustc => builder.ensure(compile::Rustc { compiler, target }), + Mode::ToolRustc => { + builder.ensure(compile::Std { compiler, target: compiler.host }); + builder.ensure(compile::Rustc { compiler, target }); + } Mode::ToolStd => builder.ensure(compile::Std { compiler, target }), Mode::ToolBootstrap => {} // uses downloaded stage0 compiler libs _ => panic!("unexpected Mode for tool build"), diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 82049492672..1ed94ec109c 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -161,7 +161,7 @@ function hideThemeButtonState() { outputElement: function() { return document.getElementById("search"); }, - title: null, + title: document.title, titleBeforeSearch: document.title, timeout: null, // On the search screen, so you remain on the last tab you opened. diff --git a/src/test/rustdoc-gui/escape-key.goml b/src/test/rustdoc-gui/escape-key.goml index 303dd000ba3..ec034f52c97 100644 --- a/src/test/rustdoc-gui/escape-key.goml +++ b/src/test/rustdoc-gui/escape-key.goml @@ -22,6 +22,13 @@ assert: ("#help", "class", "hidden") assert: ("#search", "class", "content") assert: ("#main", "class", "content hidden") -// FIXME: Once https://github.com/rust-lang/rust/pull/84462 is merged, add check to ensure -// that Escape hides the search results when a result is focused. -// press-key: "ArrowDown" +// Check that Escape hides the search results when a search result is focused. +focus: ".search-input" +assert: ".search-input:focus" +press-key: "ArrowDown" +assert-false: ".search-input:focus" +assert: "#results a:focus" +press-key: "Escape" +assert: ("#help", "class", "hidden") +assert: ("#search", "class", "content hidden") +assert: ("#main", "class", "content") diff --git a/src/test/ui/suggestions/issue-85347.rs b/src/test/ui/suggestions/issue-85347.rs new file mode 100644 index 00000000000..f08e38689d6 --- /dev/null +++ b/src/test/ui/suggestions/issue-85347.rs @@ -0,0 +1,10 @@ +#![allow(incomplete_features)] +#![feature(generic_associated_types)] +use std::ops::Deref; +trait Foo { + type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>; + //~^ ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied + //~| HELP add missing +} + +fn main() {} diff --git a/src/test/ui/suggestions/issue-85347.stderr b/src/test/ui/suggestions/issue-85347.stderr new file mode 100644 index 00000000000..60594baa29c --- /dev/null +++ b/src/test/ui/suggestions/issue-85347.stderr @@ -0,0 +1,19 @@ +error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied + --> $DIR/issue-85347.rs:5:42 + | +LL | type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>; + | ^^^ expected 1 lifetime argument + | +note: associated type defined here, with 1 lifetime parameter: `'a` + --> $DIR/issue-85347.rs:5:10 + | +LL | type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>; + | ^^^ -- +help: add missing lifetime argument + | +LL | type Bar<'a>: Deref<Target = <Self>::Bar<'a, Target = Self>>; + | ^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0107`. |
