Skip to content

Commit 55f01af

Browse files
Generate unstable docs with items under feature
Add the items to the autogenerated stubs Make unstable-book-gen use the top stage instead of stage 0 Generate the full docs, only print and save optional notes
1 parent c4e0cd9 commit 55f01af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+203
-209
lines changed

Cargo.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6045,6 +6045,9 @@ name = "unstable-book-gen"
60456045
version = "0.1.0"
60466046
dependencies = [
60476047
"num-traits",
6048+
"rustdoc-json-types",
6049+
"serde_json",
6050+
"syn",
60486051
"tidy",
60496052
]
60506053

src/bootstrap/builder/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ mod dist {
286286
// Make sure rustdoc is only built once.
287287
assert_eq!(
288288
first(cache.all::<tool::Rustdoc>()),
289-
&[tool::Rustdoc { compiler: Compiler { host: a, stage: 2 } },]
289+
&[tool::Rustdoc { compiler: Compiler { host: a, stage: 2 } }]
290290
);
291291
}
292292

@@ -608,7 +608,7 @@ mod dist {
608608
// stage minus 1 if --stage is not 0. Very confusing!
609609
assert_eq!(
610610
first(builder.cache.all::<tool::Rustdoc>()),
611-
&[tool::Rustdoc { compiler: Compiler { host: a, stage: 2 } },]
611+
&[tool::Rustdoc { compiler: Compiler { host: a, stage: 2 } }]
612612
);
613613
}
614614

src/bootstrap/doc.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -931,6 +931,13 @@ impl Step for UnstableBookGen {
931931

932932
fn run(self, builder: &Builder<'_>) {
933933
let target = self.target;
934+
let host = builder.build.build;
935+
936+
builder.ensure(Std {
937+
stage: builder.top_stage,
938+
target: host,
939+
format: DocumentationFormat::JSON,
940+
});
934941

935942
builder.info(&format!("Generating unstable book md files ({})", target));
936943
let out = builder.md_doc_out(target).join("unstable-book");
@@ -940,6 +947,7 @@ impl Step for UnstableBookGen {
940947
cmd.arg(builder.src.join("library"));
941948
cmd.arg(builder.src.join("compiler"));
942949
cmd.arg(builder.src.join("src"));
950+
cmd.arg(builder.json_doc_out(host));
943951
cmd.arg(out);
944952

945953
builder.run(&mut cmd);

src/doc/unstable-book/src/library-features/allocator-api.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# `allocator_api`
2-
3-
The tracking issue for this feature is [#32838]
4-
5-
[#32838]: https://github.com/rust-lang/rust/issues/32838
6-
7-
------------------------
8-
91
Sometimes you want the memory for one collection to use a different
102
allocator than the memory for another collection. In this case,
113
replacing the global allocator is not a workable option. Instead,

src/doc/unstable-book/src/library-features/c-variadic.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# `c_variadic`
2-
3-
The tracking issue for this feature is: [#44930]
4-
5-
[#44930]: https://github.com/rust-lang/rust/issues/44930
6-
7-
------------------------
8-
91
The `c_variadic` library feature exposes the `VaList` structure,
102
Rust's analogue of C's `va_list` type.
113

src/doc/unstable-book/src/library-features/c-void-variant.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/doc/unstable-book/src/library-features/concat-idents.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# `concat_idents`
2-
3-
The tracking issue for this feature is: [#29599]
4-
5-
[#29599]: https://github.com/rust-lang/rust/issues/29599
6-
7-
------------------------
8-
91
The `concat_idents` feature adds a macro for concatenating multiple identifiers
102
into one identifier.
113

src/doc/unstable-book/src/library-features/core-intrinsics.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/doc/unstable-book/src/library-features/core-panic.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/doc/unstable-book/src/library-features/core-private-bignum.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)