mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Document rustfmt on nightly-rustc
The recursion_limit attribute avoids the following error: ``` error[E0275]: overflow evaluating the requirement `std::ptr::Unique<rustc_ast::Pat>: std::marker::Send` | = help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`rustfmt_nightly`) ```
This commit is contained in:
parent
81f3ab6bca
commit
01cf0bde27
@ -465,7 +465,7 @@ impl<'a> Builder<'a> {
|
|||||||
doc::Std,
|
doc::Std,
|
||||||
doc::Rustc,
|
doc::Rustc,
|
||||||
doc::Rustdoc,
|
doc::Rustdoc,
|
||||||
// doc::Rustfmt,
|
doc::Rustfmt,
|
||||||
doc::ErrorIndex,
|
doc::ErrorIndex,
|
||||||
doc::Nomicon,
|
doc::Nomicon,
|
||||||
doc::Reference,
|
doc::Reference,
|
||||||
|
@ -594,7 +594,7 @@ impl Step for Rustc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! tool_doc {
|
macro_rules! tool_doc {
|
||||||
($tool: ident, $should_run: literal, $path: literal, [$($krate: literal),+ $(,)?]) => {
|
($tool: ident, $should_run: literal, $path: literal, [$($krate: literal),+ $(,)?] $(, binary=$bin:expr)?) => {
|
||||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||||
pub struct $tool {
|
pub struct $tool {
|
||||||
stage: u32,
|
stage: u32,
|
||||||
@ -639,9 +639,6 @@ macro_rules! tool_doc {
|
|||||||
// Build rustc docs so that we generate relative links.
|
// Build rustc docs so that we generate relative links.
|
||||||
builder.ensure(Rustc { stage, target });
|
builder.ensure(Rustc { stage, target });
|
||||||
|
|
||||||
// Build the tool.
|
|
||||||
builder.ensure(tool::$tool { compiler });
|
|
||||||
|
|
||||||
// Symlink compiler docs to the output directory of rustdoc documentation.
|
// Symlink compiler docs to the output directory of rustdoc documentation.
|
||||||
let out_dir = builder.stage_out(compiler, Mode::ToolRustc).join(target.triple).join("doc");
|
let out_dir = builder.stage_out(compiler, Mode::ToolRustc).join(target.triple).join("doc");
|
||||||
t!(fs::create_dir_all(&out_dir));
|
t!(fs::create_dir_all(&out_dir));
|
||||||
@ -666,7 +663,9 @@ macro_rules! tool_doc {
|
|||||||
cargo.arg("-p").arg($krate);
|
cargo.arg("-p").arg($krate);
|
||||||
)+
|
)+
|
||||||
|
|
||||||
cargo.rustdocflag("--document-private-items");
|
$(if !$bin {
|
||||||
|
cargo.rustdocflag("--document-private-items");
|
||||||
|
})?
|
||||||
cargo.rustdocflag("--enable-index-page");
|
cargo.rustdocflag("--enable-index-page");
|
||||||
cargo.rustdocflag("--show-type-layout");
|
cargo.rustdocflag("--show-type-layout");
|
||||||
cargo.rustdocflag("-Zunstable-options");
|
cargo.rustdocflag("-Zunstable-options");
|
||||||
@ -677,6 +676,13 @@ macro_rules! tool_doc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tool_doc!(Rustdoc, "rustdoc-tool", "src/tools/rustdoc", ["rustdoc", "rustdoc-json-types"]);
|
tool_doc!(Rustdoc, "rustdoc-tool", "src/tools/rustdoc", ["rustdoc", "rustdoc-json-types"]);
|
||||||
|
tool_doc!(
|
||||||
|
Rustfmt,
|
||||||
|
"rustfmt-nightly",
|
||||||
|
"src/tools/rustfmt",
|
||||||
|
["rustfmt-nightly", "rustfmt-config_proc_macro"],
|
||||||
|
binary = true
|
||||||
|
);
|
||||||
|
|
||||||
#[derive(Ord, PartialOrd, Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
#[derive(Ord, PartialOrd, Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||||
pub struct ErrorIndex {
|
pub struct ErrorIndex {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
#![deny(rust_2018_idioms)]
|
#![deny(rust_2018_idioms)]
|
||||||
#![warn(unreachable_pub)]
|
#![warn(unreachable_pub)]
|
||||||
|
#![recursion_limit = "256"]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate derive_new;
|
extern crate derive_new;
|
||||||
|
Loading…
Reference in New Issue
Block a user