From 264442c140fb277f07b2d45a1fb0cef96e0a2caa Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Fri, 23 Apr 2021 12:05:12 -0400 Subject: [PATCH 01/15] Don't rebuild rustdoc after checking bootstrap This works by unconditionally passing -Z unstable-options to the compiler. This has no affect in practice since bootstrap doesn't use `deny(rustc::internal)`. --- src/bootstrap/check.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index 6626fead774..ca8ea63047b 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -321,11 +321,9 @@ fn run(self, builder: &Builder<'_>) { } // Enable internal lints for clippy and rustdoc - // NOTE: this intentionally doesn't enable lints for any other tools, - // see https://github.com/rust-lang/rust/pull/80573#issuecomment-754010776 - if $path == "src/tools/rustdoc" || $path == "src/tools/clippy" { - cargo.rustflag("-Zunstable-options"); - } + // NOTE: this doesn't enable lints for any other tools unless they explicitly add `#![deny(rustc::internal)]` + // See https://github.com/rust-lang/rust/pull/80573#issuecomment-754010776 + cargo.rustflag("-Zunstable-options"); builder.info(&format!( "Checking stage{} {} artifacts ({} -> {})", From e8a143a7383e4c494c64e67a39203023a80a545f Mon Sep 17 00:00:00 2001 From: Smitty Date: Sat, 24 Apr 2021 10:34:41 -0400 Subject: [PATCH 02/15] Ignore commented out lines when finding features --- src/tools/tidy/src/features.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs index cb84fd8be6f..24c98b54a98 100644 --- a/src/tools/tidy/src/features.rs +++ b/src/tools/tidy/src/features.rs @@ -423,6 +423,15 @@ macro_rules! err { continue; }}; } + + lazy_static::lazy_static! { + static ref COMMENT_LINE: Regex = Regex::new(r"\s*//").unwrap(); + } + // exclude commented out lines + if COMMENT_LINE.is_match(line) { + continue; + } + if let Some((ref name, ref mut f)) = becoming_feature { if f.tracking_issue.is_none() { f.tracking_issue = find_attr_val(line, "issue").and_then(handle_issue_none); From 79020a8d638697dfb9362c2a1a4fc73aa864232b Mon Sep 17 00:00:00 2001 From: Rich Kadel Date: Sat, 24 Apr 2021 14:12:22 -0700 Subject: [PATCH 03/15] `test tidy` should ignore alternative `build` dir patterns I need to have multiple `build` directories, such as `build`, `build-fuchsia`, and `build-test`. But when I'm uploading a change, I run `./x.py test tidy`, and if I have a `build-something` directory with Rust sources, I git a bunch of formatting errors. `rustfmt.toml` only ignores the directory named `build`. This change extends the patterns to also ignore `build-*` and `*-build`. As a rustc contributor, I not only build the rust compiler to develop new features, but I also build alternative "distributions" (using secondary `*-config.toml` files with different configurations), including: * To occasionally rebuild a version of the compiler that `rust-analyzer` can use to `check` source (which fixes issues in the VS Code UI, so changing and rebuilding the compiler does not break VS Code editing Rust code). * To build custom distributions for Fuchsia * To build test distributions when working on changes to `bootstrap` (e.g., when I recently added `rust-demangler` to distributions) --- rustfmt.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rustfmt.toml b/rustfmt.toml index af807aa6f73..480b19a5e93 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -7,6 +7,8 @@ merge_derives = false # tidy only checks files which are not ignored, each entry follows gitignore style ignore = [ "/build/", + "/*-build/", + "/build-*/", "/vendor/", # tests for now are not formatted, as they are sometimes pretty-printing constrained From 43309f936cf7247250ec7d7f0783b9b97b7013aa Mon Sep 17 00:00:00 2001 From: 12101111 Date: Sun, 25 Apr 2021 14:02:34 +0800 Subject: [PATCH 04/15] Build sanitizers for x86_64-unknown-linux-musl --- src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile index 08f07eb8284..ea70771a570 100644 --- a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile @@ -38,6 +38,7 @@ ENV HOSTS=x86_64-unknown-linux-musl ENV RUST_CONFIGURE_ARGS \ --musl-root-x86_64=/usr/local/x86_64-linux-musl \ --enable-extended \ + --enable-sanitizers \ --enable-profiler \ --enable-lld \ --set target.x86_64-unknown-linux-musl.crt-static=false \ From 9e722f7e32194beeb92c0861cb4c194ac705f98b Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Sun, 25 Apr 2021 12:09:08 -0400 Subject: [PATCH 05/15] Set `backtrace-on-ice` by default for compiler and codegen profiles If there's an ICE while bootstrapping, it's most likely because of a change to the compiler. --- src/bootstrap/defaults/config.codegen.toml | 2 ++ src/bootstrap/defaults/config.compiler.toml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/bootstrap/defaults/config.codegen.toml b/src/bootstrap/defaults/config.codegen.toml index a9505922ca7..011ff6821b7 100644 --- a/src/bootstrap/defaults/config.codegen.toml +++ b/src/bootstrap/defaults/config.codegen.toml @@ -11,3 +11,5 @@ assertions = true debug-logging = true # This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower. incremental = true +# Print backtrace on internal compiler errors during bootstrap +backtrace-on-ice = true diff --git a/src/bootstrap/defaults/config.compiler.toml b/src/bootstrap/defaults/config.compiler.toml index 883bfead64e..4d689d117bc 100644 --- a/src/bootstrap/defaults/config.compiler.toml +++ b/src/bootstrap/defaults/config.compiler.toml @@ -6,6 +6,8 @@ debug-logging = true # This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower. incremental = true +# Print backtrace on internal compiler errors during bootstrap +backtrace-on-ice = true [llvm] # Will download LLVM from CI if available on your platform. From a7e23f42cff3de644baa9203bf8bc4f15f8ed853 Mon Sep 17 00:00:00 2001 From: Smittyvb Date: Sun, 25 Apr 2021 15:37:08 -0400 Subject: [PATCH 06/15] Add starting anchor Co-authored-by: Joshua Nelson --- src/tools/tidy/src/features.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs index 24c98b54a98..b14b5aeb572 100644 --- a/src/tools/tidy/src/features.rs +++ b/src/tools/tidy/src/features.rs @@ -425,7 +425,7 @@ macro_rules! err { } lazy_static::lazy_static! { - static ref COMMENT_LINE: Regex = Regex::new(r"\s*//").unwrap(); + static ref COMMENT_LINE: Regex = Regex::new(r"^\s*//").unwrap(); } // exclude commented out lines if COMMENT_LINE.is_match(line) { From 1c8e12217704c3290bfb05f0f75688b6a7849e75 Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Tue, 27 Apr 2021 13:00:36 -0400 Subject: [PATCH 07/15] Switch `rustc::internal` from deny to warn These should still obey deny-warnings. --- src/bootstrap/check.rs | 2 +- src/librustdoc/lib.rs | 2 +- src/tools/clippy/clippy_lints/src/lib.rs | 2 +- src/tools/clippy/src/driver.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index ca8ea63047b..38dda5b744e 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -321,7 +321,7 @@ fn run(self, builder: &Builder<'_>) { } // Enable internal lints for clippy and rustdoc - // NOTE: this doesn't enable lints for any other tools unless they explicitly add `#![deny(rustc::internal)]` + // NOTE: this doesn't enable lints for any other tools unless they explicitly add `#![warn(rustc::internal)]` // See https://github.com/rust-lang/rust/pull/80573#issuecomment-754010776 cargo.rustflag("-Zunstable-options"); diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 2a51d78f64a..222d362ba6b 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -16,7 +16,7 @@ #![feature(type_ascription)] #![feature(iter_intersperse)] #![recursion_limit = "256"] -#![deny(rustc::internal)] +#![warn(rustc::internal)] #[macro_use] extern crate lazy_static; diff --git a/src/tools/clippy/clippy_lints/src/lib.rs b/src/tools/clippy/clippy_lints/src/lib.rs index 11fef30945d..22e6bb822b8 100644 --- a/src/tools/clippy/clippy_lints/src/lib.rs +++ b/src/tools/clippy/clippy_lints/src/lib.rs @@ -17,7 +17,7 @@ // warn on lints, that are included in `rust-lang/rust`s bootstrap #![warn(rust_2018_idioms, unused_lifetimes)] // warn on rustc internal lints -#![deny(rustc::internal)] +#![warn(rustc::internal)] // FIXME: switch to something more ergonomic here, once available. // (Currently there is no way to opt into sysroot crates without `extern crate`.) diff --git a/src/tools/clippy/src/driver.rs b/src/tools/clippy/src/driver.rs index fa0c5f01430..750a23e8c98 100644 --- a/src/tools/clippy/src/driver.rs +++ b/src/tools/clippy/src/driver.rs @@ -4,7 +4,7 @@ // warn on lints, that are included in `rust-lang/rust`s bootstrap #![warn(rust_2018_idioms, unused_lifetimes)] // warn on rustc internal lints -#![deny(rustc::internal)] +#![warn(rustc::internal)] // FIXME: switch to something more ergonomic here, once available. // (Currently there is no way to opt into sysroot crates without `extern crate`.) From eb753e8ea65deeaf1ed27d3b82e49bbfac6798af Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Wed, 28 Apr 2021 18:23:44 +0900 Subject: [PATCH 08/15] Add a regression test for #75883 --- src/test/ui/typeck/issue-75883.rs | 22 ++++++++++++ src/test/ui/typeck/issue-75883.stderr | 52 +++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 src/test/ui/typeck/issue-75883.rs create mode 100644 src/test/ui/typeck/issue-75883.stderr diff --git a/src/test/ui/typeck/issue-75883.rs b/src/test/ui/typeck/issue-75883.rs new file mode 100644 index 00000000000..3a59ca049ba --- /dev/null +++ b/src/test/ui/typeck/issue-75883.rs @@ -0,0 +1,22 @@ +// Regression test for #75883. + +pub struct UI {} + +impl UI { + pub fn run() -> Result<_> { + //~^ ERROR: this enum takes 2 type arguments but only 1 type argument was supplied + //~| ERROR: the type placeholder `_` is not allowed within types on item signatures + let mut ui = UI {}; + ui.interact(); + + unimplemented!(); + } + + pub fn interact(&mut self) -> Result<_> { + //~^ ERROR: this enum takes 2 type arguments but only 1 type argument was supplied + //~| ERROR: the type placeholder `_` is not allowed within types on item signatures + unimplemented!(); + } +} + +fn main() {} diff --git a/src/test/ui/typeck/issue-75883.stderr b/src/test/ui/typeck/issue-75883.stderr new file mode 100644 index 00000000000..a6b2eb8f972 --- /dev/null +++ b/src/test/ui/typeck/issue-75883.stderr @@ -0,0 +1,52 @@ +error[E0107]: this enum takes 2 type arguments but only 1 type argument was supplied + --> $DIR/issue-75883.rs:6:21 + | +LL | pub fn run() -> Result<_> { + | ^^^^^^ - supplied 1 type argument + | | + | expected 2 type arguments + | +note: enum defined here, with 2 type parameters: `T`, `E` + --> $SRC_DIR/core/src/result.rs:LL:COL + | +LL | pub enum Result { + | ^^^^^^ - - +help: add missing type argument + | +LL | pub fn run() -> Result<_, E> { + | ^^^ + +error[E0107]: this enum takes 2 type arguments but only 1 type argument was supplied + --> $DIR/issue-75883.rs:15:35 + | +LL | pub fn interact(&mut self) -> Result<_> { + | ^^^^^^ - supplied 1 type argument + | | + | expected 2 type arguments + | +note: enum defined here, with 2 type parameters: `T`, `E` + --> $SRC_DIR/core/src/result.rs:LL:COL + | +LL | pub enum Result { + | ^^^^^^ - - +help: add missing type argument + | +LL | pub fn interact(&mut self) -> Result<_, E> { + | ^^^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures + --> $DIR/issue-75883.rs:15:42 + | +LL | pub fn interact(&mut self) -> Result<_> { + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures + --> $DIR/issue-75883.rs:6:28 + | +LL | pub fn run() -> Result<_> { + | ^ not allowed in type signatures + +error: aborting due to 4 previous errors + +Some errors have detailed explanations: E0107, E0121. +For more information about an error, try `rustc --explain E0107`. From de92dfb3b604cfb6316ba7d5a3dea2bd36b6072d Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Wed, 28 Apr 2021 18:23:49 +0900 Subject: [PATCH 09/15] Add a regression test for #80779 --- src/test/ui/typeck/issue-80779.rs | 13 +++++++++++++ src/test/ui/typeck/issue-80779.stderr | 21 +++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 src/test/ui/typeck/issue-80779.rs create mode 100644 src/test/ui/typeck/issue-80779.stderr diff --git a/src/test/ui/typeck/issue-80779.rs b/src/test/ui/typeck/issue-80779.rs new file mode 100644 index 00000000000..6791976196f --- /dev/null +++ b/src/test/ui/typeck/issue-80779.rs @@ -0,0 +1,13 @@ +// Regression test for #80779. + +pub struct T<'a>(&'a str); + +pub fn f<'a>(val: T<'a>) -> _ { + //~^ ERROR: the type placeholder `_` is not allowed within types on item signatures + g(val) +} + +pub fn g(_: T<'static>) -> _ {} +//~^ ERROR: the type placeholder `_` is not allowed within types on item signatures + +fn main() {} diff --git a/src/test/ui/typeck/issue-80779.stderr b/src/test/ui/typeck/issue-80779.stderr new file mode 100644 index 00000000000..aca494520f8 --- /dev/null +++ b/src/test/ui/typeck/issue-80779.stderr @@ -0,0 +1,21 @@ +error[E0121]: the type placeholder `_` is not allowed within types on item signatures + --> $DIR/issue-80779.rs:10:28 + | +LL | pub fn g(_: T<'static>) -> _ {} + | ^ + | | + | not allowed in type signatures + | help: replace with the correct return type: `()` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures + --> $DIR/issue-80779.rs:5:29 + | +LL | pub fn f<'a>(val: T<'a>) -> _ { + | ^ + | | + | not allowed in type signatures + | help: replace with the correct return type: `()` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0121`. From 8b806bcd41c051f1b9156defe3b46ed9e3948751 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Wed, 28 Apr 2021 09:53:32 -0700 Subject: [PATCH 10/15] Remove extra word in `rustc_mir` docs Changes "is includes" to "includes" in `rustc_mir::borrow_check::type_check::type_check`. --- compiler/rustc_mir/src/borrow_check/type_check/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_mir/src/borrow_check/type_check/mod.rs b/compiler/rustc_mir/src/borrow_check/type_check/mod.rs index 3248554e204..d27fcb2f26f 100644 --- a/compiler/rustc_mir/src/borrow_check/type_check/mod.rs +++ b/compiler/rustc_mir/src/borrow_check/type_check/mod.rs @@ -97,7 +97,7 @@ macro_rules! span_mirbug_and_err { /// Type checks the given `mir` in the context of the inference /// context `infcx`. Returns any region constraints that have yet to -/// be proven. This result is includes liveness constraints that +/// be proven. This result includes liveness constraints that /// ensure that regions appearing in the types of all local variables /// are live at all points where that local variable may later be /// used. From 1ac632627b7fc172887d0b8395cb8c8997c72274 Mon Sep 17 00:00:00 2001 From: Christiaan Dirkx Date: Wed, 28 Apr 2021 19:11:57 +0200 Subject: [PATCH 11/15] Remove `DropGuard` in `sys::windows::process` and use `StaticMutex` instead --- library/std/src/sys/windows/process.rs | 28 ++++---------------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/library/std/src/sys/windows/process.rs b/library/std/src/sys/windows/process.rs index 30bbfdd0dd1..a5799606142 100644 --- a/library/std/src/sys/windows/process.rs +++ b/library/std/src/sys/windows/process.rs @@ -19,9 +19,9 @@ use crate::sys::cvt; use crate::sys::fs::{File, OpenOptions}; use crate::sys::handle::Handle; -use crate::sys::mutex::Mutex; use crate::sys::pipe::{self, AnonPipe}; use crate::sys::stdio; +use crate::sys_common::mutex::StaticMutex; use crate::sys_common::process::{CommandEnv, CommandEnvs}; use crate::sys_common::AsInner; @@ -94,10 +94,6 @@ pub struct StdioPipes { pub stderr: Option, } -struct DropGuard<'a> { - lock: &'a Mutex, -} - impl Command { pub fn new(program: &OsStr) -> Command { Command { @@ -209,8 +205,9 @@ pub fn spawn( // // For more information, msdn also has an article about this race: // http://support.microsoft.com/kb/315939 - static CREATE_PROCESS_LOCK: Mutex = Mutex::new(); - let _guard = DropGuard::new(&CREATE_PROCESS_LOCK); + static CREATE_PROCESS_LOCK: StaticMutex = StaticMutex::new(); + + let _guard = unsafe { CREATE_PROCESS_LOCK.lock() }; let mut pipes = StdioPipes { stdin: None, stdout: None, stderr: None }; let null = Stdio::Null; @@ -259,23 +256,6 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { } } -impl<'a> DropGuard<'a> { - fn new(lock: &'a Mutex) -> DropGuard<'a> { - unsafe { - lock.lock(); - DropGuard { lock } - } - } -} - -impl<'a> Drop for DropGuard<'a> { - fn drop(&mut self) { - unsafe { - self.lock.unlock(); - } - } -} - impl Stdio { fn to_handle(&self, stdio_id: c::DWORD, pipe: &mut Option) -> io::Result { match *self { From 153eb72d652ca2868ad586056579d71d9231254f Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Tue, 27 Apr 2021 15:47:49 -0700 Subject: [PATCH 12/15] rustdoc: change aliases attribute to data-aliases The "aliases" attribute is not listed [on MDN], so it sounds like it's rustdoc-specific. We don't want to conflict with any attributes that are added to the spec in the future. [on MDN]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements --- src/librustdoc/html/render/mod.rs | 2 +- src/librustdoc/html/static/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 518dbc6eeb3..7de72d81987 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -1546,7 +1546,7 @@ fn render_default_items( let aliases = if aliases.is_empty() { String::new() } else { - format!(" aliases=\"{}\"", aliases.join(",")) + format!(" data-aliases=\"{}\"", aliases.join(",")) }; if let Some(use_absolute) = use_absolute { write!( diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 7fbb97beae7..95b18490641 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -834,7 +834,7 @@ function hideThemeButtonState() { // (like "Send" and "Sync"). var inlined_types = new Set(); onEachLazy(synthetic_implementors.getElementsByClassName("impl"), function(el) { - var aliases = el.getAttribute("aliases"); + var aliases = el.getAttribute("data-aliases"); if (!aliases) { return; } From b57049acdb85aa96fac8abcbbbc8d8948b698634 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Tue, 27 Apr 2021 16:27:07 -0700 Subject: [PATCH 13/15] rustdoc: update auto_aliases test case with data-aliases attribute --- src/test/rustdoc/auto_aliases.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/rustdoc/auto_aliases.rs b/src/test/rustdoc/auto_aliases.rs index b8f3527510c..56e0770ab5c 100644 --- a/src/test/rustdoc/auto_aliases.rs +++ b/src/test/rustdoc/auto_aliases.rs @@ -1,6 +1,6 @@ #![feature(auto_traits)] -// @has auto_aliases/trait.Bar.html '//h3[@aliases="auto_aliases::Foo"]' 'impl Bar for Foo' +// @has auto_aliases/trait.Bar.html '//h3[@data-aliases="auto_aliases::Foo"]' 'impl Bar for Foo' pub struct Foo; pub auto trait Bar {} From 8dc09e1d040f7ce2a376ccdfd6f9cc103b5be4cc Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 28 Apr 2021 11:28:57 -0700 Subject: [PATCH 14/15] Update books --- src/doc/book | 2 +- src/doc/reference | 2 +- src/doc/rust-by-example | 2 +- src/doc/rustc-dev-guide | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/doc/book b/src/doc/book index b54090a99ec..50dd06cb71b 160000 --- a/src/doc/book +++ b/src/doc/book @@ -1 +1 @@ -Subproject commit b54090a99ec7c4b46a5203a9c927fdbc311bb1f5 +Subproject commit 50dd06cb71beb27fdc0eebade5509cdcc1f821ed diff --git a/src/doc/reference b/src/doc/reference index e1abb17cd94..d23f9da8469 160000 --- a/src/doc/reference +++ b/src/doc/reference @@ -1 +1 @@ -Subproject commit e1abb17cd94cd5a8a374b48e1bc8134a2208ed48 +Subproject commit d23f9da8469617e6c81121d9fd123443df70595d diff --git a/src/doc/rust-by-example b/src/doc/rust-by-example index c80f0b09fc1..e0a721f5202 160000 --- a/src/doc/rust-by-example +++ b/src/doc/rust-by-example @@ -1 +1 @@ -Subproject commit c80f0b09fc15b9251825343be910c08531938ab2 +Subproject commit e0a721f5202e6d9bec0aff99f10e44480c0da9e7 diff --git a/src/doc/rustc-dev-guide b/src/doc/rustc-dev-guide index a9bd2bbf31e..e72b43a6492 160000 --- a/src/doc/rustc-dev-guide +++ b/src/doc/rustc-dev-guide @@ -1 +1 @@ -Subproject commit a9bd2bbf31e4f92b5d3d8e80b22839d0cc7a2022 +Subproject commit e72b43a64925ce053dc7830e21c1a57ba00499bd From b28754ab7d2a3440362d208bfd8c3f39511a7eeb Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Mon, 26 Apr 2021 08:22:47 -0400 Subject: [PATCH 15/15] Add `x.py check src/librustdoc` as an alias for `x.py check src/tools/rustdoc` --- src/bootstrap/check.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index 6626fead774..536843d4ec2 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -280,7 +280,7 @@ fn run(self, builder: &Builder<'_>) { } macro_rules! tool_check_step { - ($name:ident, $path:expr, $source_type:expr) => { + ($name:ident, $path:literal, $($alias:literal, )* $source_type:path) => { #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub struct $name { pub target: TargetSelection, @@ -292,7 +292,7 @@ impl Step for $name { const DEFAULT: bool = true; fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { - run.path($path) + run.paths(&[ $path, $($alias),* ]) } fn make_run(run: RunConfig<'_>) { @@ -363,7 +363,7 @@ fn stamp( }; } -tool_check_step!(Rustdoc, "src/tools/rustdoc", SourceType::InTree); +tool_check_step!(Rustdoc, "src/tools/rustdoc", "src/librustdoc", SourceType::InTree); // Clippy is a hybrid. It is an external tool, but uses a git subtree instead // of a submodule. Since the SourceType only drives the deny-warnings // behavior, treat it as in-tree so that any new warnings in clippy will be