File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,6 @@ impl Step for UnstableBook {
136
136
pub struct CargoBook {
137
137
target : Interned < String > ,
138
138
name : Interned < String > ,
139
- src : Interned < PathBuf > ,
140
139
}
141
140
142
141
impl Step for CargoBook {
@@ -152,21 +151,25 @@ impl Step for CargoBook {
152
151
run. builder . ensure ( CargoBook {
153
152
target : run. target ,
154
153
name : INTERNER . intern_str ( "cargo" ) ,
155
- src : INTERNER . intern_path ( PathBuf :: from ( "src/tools/cargo/src/doc/book" ) ) ,
156
154
} ) ;
157
155
}
158
156
159
157
fn run ( self , builder : & Builder ) {
160
158
let build = builder. build ;
159
+
161
160
let target = self . target ;
162
161
let name = self . name ;
163
- let src = self . src ;
162
+ let src = PathBuf :: from ( "src/tools/cargo/src/doc/book" ) ;
163
+
164
164
let out = build. doc_out ( target) ;
165
165
t ! ( fs:: create_dir_all( & out) ) ;
166
166
167
167
let out = out. join ( name) ;
168
+
168
169
println ! ( "Cargo Book ({}) - {}" , target, name) ;
170
+
169
171
let _ = fs:: remove_dir_all ( & out) ;
172
+
170
173
build. run ( builder. tool_cmd ( Tool :: Rustbook )
171
174
. arg ( "build" )
172
175
. arg ( & src)
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ Rust provides a number of book-length sets of documentation, collectively
28
28
nicknamed 'The Rust Bookshelf.'
29
29
30
30
* [ 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.
31
32
* [ The Unstable Book] [ unstable-book ] has documentation for unstable features.
32
33
* [ The Rustonomicon] [ nomicon ] is your guidebook to the dark arts of unsafe Rust.
33
34
* [ 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
53
54
[ nomicon ] : nomicon/index.html
54
55
[ unstable-book ] : unstable-book/index.html
55
56
[ rustdoc-book ] : rustdoc/index.html
57
+ [ cargo-book ] : cargo/index.html
56
58
You can’t perform that action at this time.
0 commit comments