Skip to content

Commit 3b32a3a

Browse files
committed
link the cargo book into the bookshelf
1 parent 623886f commit 3b32a3a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Diff for: src/bootstrap/doc.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ impl Step for UnstableBook {
136136
pub struct CargoBook {
137137
target: Interned<String>,
138138
name: Interned<String>,
139-
src: Interned<PathBuf>,
140139
}
141140

142141
impl Step for CargoBook {
@@ -152,21 +151,25 @@ impl Step for CargoBook {
152151
run.builder.ensure(CargoBook {
153152
target: run.target,
154153
name: INTERNER.intern_str("cargo"),
155-
src: INTERNER.intern_path(PathBuf::from("src/tools/cargo/src/doc/book")),
156154
});
157155
}
158156

159157
fn run(self, builder: &Builder) {
160158
let build = builder.build;
159+
161160
let target = self.target;
162161
let name = self.name;
163-
let src = self.src;
162+
let src = PathBuf::from("src/tools/cargo/src/doc/book");
163+
164164
let out = build.doc_out(target);
165165
t!(fs::create_dir_all(&out));
166166

167167
let out = out.join(name);
168+
168169
println!("Cargo Book ({}) - {}", target, name);
170+
169171
let _ = fs::remove_dir_all(&out);
172+
170173
build.run(builder.tool_cmd(Tool::Rustbook)
171174
.arg("build")
172175
.arg(&src)

Diff for: src/doc/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Rust provides a number of book-length sets of documentation, collectively
2828
nicknamed 'The Rust Bookshelf.'
2929

3030
* [The Rust Programming Language][book] teaches you how to program in Rust.
31+
* [The Cargo Book][cargo-book] is a guide to Cargo, Rust's build tool and dependency manager.
3132
* [The Unstable Book][unstable-book] has documentation for unstable features.
3233
* [The Rustonomicon][nomicon] is your guidebook to the dark arts of unsafe Rust.
3334
* [The Reference][ref] is not a formal spec, but is more detailed and comprehensive than the book.
@@ -53,4 +54,5 @@ before this policy was put into place. That work is being tracked
5354
[nomicon]: nomicon/index.html
5455
[unstable-book]: unstable-book/index.html
5556
[rustdoc-book]: rustdoc/index.html
57+
[cargo-book]: cargo/index.html
5658

0 commit comments

Comments
 (0)