about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-08-10 11:29:44 +0200
committerJakub Beránek <berykubik@gmail.com>2025-08-10 11:39:07 +0200
commit89a27d26dcc36c3286cc1e88de704bc83f5f9859 (patch)
treec8237368807bb08b8e424c21356f9c6576aec7ae
parentc843e1d28f564d623c90b4cb3ee009ba6bebc1d5 (diff)
downloadrust-89a27d26dcc36c3286cc1e88de704bc83f5f9859.tar.gz
rust-89a27d26dcc36c3286cc1e88de704bc83f5f9859.zip
Review remarks
-rw-r--r--src/bootstrap/src/core/build_steps/doc.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bootstrap/src/core/build_steps/doc.rs b/src/bootstrap/src/core/build_steps/doc.rs
index 7ab50febad4..28a764dc8ba 100644
--- a/src/bootstrap/src/core/build_steps/doc.rs
+++ b/src/bootstrap/src/core/build_steps/doc.rs
@@ -790,6 +790,7 @@ fn doc_std(
 
 /// Prepare a compiler that will be able to document something for `target` at `stage`.
 fn prepare_doc_compiler(builder: &Builder<'_>, target: TargetSelection, stage: u32) -> Compiler {
+    assert!(stage > 0, "Cannot document anything in stage 0");
     let build_compiler = builder.compiler(stage - 1, builder.host_target);
     builder.std(build_compiler, target);
     build_compiler
@@ -1226,10 +1227,13 @@ fn symlink_dir_force(config: &Config, original: &Path, link: &Path) {
     );
 }
 
+/// Builds the Rust compiler book.
 #[derive(Ord, PartialOrd, Debug, Clone, Hash, PartialEq, Eq)]
 pub struct RustcBook {
     build_compiler: Compiler,
     target: TargetSelection,
+    /// Test that the examples of lints in the book produce the correct lints in the expected
+    /// format.
     validate: bool,
 }
 
@@ -1331,8 +1335,8 @@ impl Step for RustcBook {
 }
 
 /// Documents the reference.
-/// It is always done using a stage 1+ compiler, because it references in-tree compiler/stdlib
-/// concepts.
+/// It has to always be done using a stage 1+ compiler, because it references in-tree
+/// compiler/stdlib concepts.
 #[derive(Ord, PartialOrd, Debug, Clone, Hash, PartialEq, Eq)]
 pub struct Reference {
     build_compiler: Compiler,