Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link unstable features #106681

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5906,6 +5906,9 @@ name = "unstable-book-gen"
version = "0.1.0"
dependencies = [
"num-traits",
"rustdoc-json-types",
"serde_json",
"syn 1.0.109",
"tidy",
]

Expand Down
9 changes: 9 additions & 0 deletions src/bootstrap/src/core/build_steps/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,14 @@ impl Step for UnstableBookGen {

fn run(self, builder: &Builder<'_>) {
let target = self.target;
let host = builder.build.build;

builder.ensure(Std::new(
builder.top_stage,
self.target,
builder,
DocumentationFormat::JSON,
));

builder.info(&format!("Generating unstable book md files ({target})"));
let out = builder.md_doc_out(target).join("unstable-book");
Expand All @@ -974,6 +982,7 @@ impl Step for UnstableBookGen {
cmd.arg(builder.src.join("library"));
cmd.arg(builder.src.join("compiler"));
cmd.arg(builder.src.join("src"));
cmd.arg(builder.json_doc_out(host));
cmd.arg(out);

builder.run(&mut cmd);
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/src/tests/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ mod dist {
// Make sure rustdoc is only built once.
assert_eq!(
first(cache.all::<tool::Rustdoc>()),
&[tool::Rustdoc { compiler: Compiler { host: a, stage: 2 } },]
&[tool::Rustdoc { compiler: Compiler { host: a, stage: 2 } }]
);
}

Expand Down Expand Up @@ -636,7 +636,7 @@ mod dist {
// stage minus 1 if --stage is not 0. Very confusing!
assert_eq!(
first(builder.cache.all::<tool::Rustdoc>()),
&[tool::Rustdoc { compiler: Compiler { host: a, stage: 2 } },]
&[tool::Rustdoc { compiler: Compiler { host: a, stage: 2 } }]
);
}

Expand Down
8 changes: 0 additions & 8 deletions src/doc/unstable-book/src/library-features/allocator-api.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# `allocator_api`

The tracking issue for this feature is [#32838]

[#32838]: https://github.com/rust-lang/rust/issues/32838

------------------------

Sometimes you want the memory for one collection to use a different
allocator than the memory for another collection. In this case,
replacing the global allocator is not a workable option. Instead,
Expand Down
8 changes: 0 additions & 8 deletions src/doc/unstable-book/src/library-features/c-variadic.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# `c_variadic`

The tracking issue for this feature is: [#44930]

[#44930]: https://github.com/rust-lang/rust/issues/44930

------------------------

The `c_variadic` library feature exposes the `VaList` structure,
Rust's analogue of C's `va_list` type.

Expand Down
5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/c-void-variant.md

This file was deleted.

8 changes: 0 additions & 8 deletions src/doc/unstable-book/src/library-features/concat-idents.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# `concat_idents`

The tracking issue for this feature is: [#29599]

[#29599]: https://github.com/rust-lang/rust/issues/29599

------------------------

The `concat_idents` feature adds a macro for concatenating multiple identifiers
into one identifier.

Expand Down
5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/core-intrinsics.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/core-panic.md

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/dec2flt.md

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/derive-eq.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/fd-read.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/fd.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/flt2dec.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/fmt-internals.md

This file was deleted.

10 changes: 0 additions & 10 deletions src/doc/unstable-book/src/library-features/fn-traits.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# `fn_traits`

The tracking issue for this feature is [#29625]

See Also: [`unboxed_closures`](../language-features/unboxed-closures.md)

[#29625]: https://github.com/rust-lang/rust/issues/29625

----

The `fn_traits` feature allows for implementation of the [`Fn*`] traits
for creating custom closure-like types.

Expand Down

This file was deleted.

8 changes: 0 additions & 8 deletions src/doc/unstable-book/src/library-features/is-sorted.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# `is_sorted`

The tracking issue for this feature is: [#53485]

[#53485]: https://github.com/rust-lang/rust/issues/53485

------------------------

Add the methods `is_sorted`, `is_sorted_by` and `is_sorted_by_key` to `[T]`;
add the methods `is_sorted`, `is_sorted_by` and `is_sorted_by_key` to
`Iterator`.

This file was deleted.

5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/print-internals.md

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/rt.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/sort-internals.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/str-internals.md

This file was deleted.

6 changes: 0 additions & 6 deletions src/doc/unstable-book/src/library-features/test.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# `test`

The tracking issue for this feature is: None.

------------------------

The internals of the `test` crate are unstable, behind the `test` flag. The
most widely used part of the `test` crate are benchmark tests, which can test
the performance of your code. Let's make our `src/lib.rs` look like this
Expand Down

This file was deleted.

8 changes: 0 additions & 8 deletions src/doc/unstable-book/src/library-features/trace-macros.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# `trace_macros`

The tracking issue for this feature is [#29598].

[#29598]: https://github.com/rust-lang/rust/issues/29598

------------------------

With `trace_macros` you can trace the expansion of macros in your code.

## Examples
Expand Down

This file was deleted.

5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/windows-c.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/windows-handle.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/windows-net.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/doc/unstable-book/src/library-features/windows-stdio.md

This file was deleted.

5 changes: 5 additions & 0 deletions src/tools/unstable-book-gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ edition = "2021"
[dependencies]
tidy = { path = "../tidy" }


serde_json = "1"
rustdoc-json-types = { path = "../../rustdoc-json-types" }
syn = { version = "1", features = ["full"] }

# not actually needed but required for now to unify the feature selection of
# `num-traits` between this and `rustbook`
num-traits = "0.2"
9 changes: 9 additions & 0 deletions src/tools/unstable-book-gen/src/issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `{name}`

The tracking issue for this feature is: [#{issue}]
{items}
[#{issue}]: https://github.com/rust-lang/rust/issues/{issue}

------------------------

{notes}
Loading
Loading