diff options
| author | André Luis Leal Cardoso Junior <andrehjr@gmail.com> | 2019-04-07 09:59:33 -0300 |
|---|---|---|
| committer | André Luis Leal Cardoso Junior <andrehjr@gmail.com> | 2019-07-06 11:05:22 -0300 |
| commit | f80697215fb1596ea6ccdbace46050fea661bffe (patch) | |
| tree | f59aac0d48490f1f2388a681ad135797c6769512 /src/bootstrap | |
| parent | d8a6ccfb4a1e41978fcf98b8cf03146b8b0264f3 (diff) | |
| download | rust-f80697215fb1596ea6ccdbace46050fea661bffe.tar.gz rust-f80697215fb1596ea6ccdbace46050fea661bffe.zip | |
Add linkcheck command to rustbook tool
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/test.rs | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 423acea016b..6c0c770bf08 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1446,7 +1446,6 @@ test_book!( TheBook, "src/doc/book", "book", default=false; UnstableBook, "src/doc/unstable-book", "unstable-book", default=true; EditionGuide, "src/doc/edition-guide", "edition-guide", default=false; - RustcGuide, "src/doc/rustc-guide", "rustc-guide", default=false; ); #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -1532,6 +1531,31 @@ fn markdown_test(builder: &Builder<'_>, compiler: Compiler, markdown: &Path) -> } #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct RustcGuide; + +impl Step for RustcGuide { + type Output = (); + const DEFAULT: bool = false; + const ONLY_HOSTS: bool = true; + + fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { + run.path("src/doc/rustc-guide") + } + + fn make_run(run: RunConfig<'_>) { + run.builder.ensure(RustcGuide); + } + + fn run(self, builder: &Builder<'_>) { + let src = builder.src.join("src/doc/rustc-guide"); + let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook); + builder.run(rustbook_cmd + .arg("linkcheck") + .arg(&src)); + } +} + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub struct CrateLibrustc { compiler: Compiler, target: Interned<String>, |
