Skip to content
Open
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
11 changes: 7 additions & 4 deletions compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2309,10 +2309,10 @@ declare_lint! {
/// ### Example
///
/// ```rust
/// #![feature(sanitize)]
/// #![cfg_attr(not(bootstrap), feature(sanitize))]
///
/// #[inline(always)]
/// #[sanitize(address = "off")]
/// #[cfg_attr(not(bootstrap), sanitize(address = "off"))]
/// fn x() {}
///
/// fn main() {
Expand Down Expand Up @@ -4832,13 +4832,16 @@ declare_lint! {
///
/// ### Example
///
/// ```rust,compile_fail
#[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")]
#[cfg_attr(bootstrap, doc = "```rust")]
/// #![doc = in_root!()]
///
/// macro_rules! in_root { () => { "" } }
///
/// fn main() {}
/// ```
#[cfg_attr(not(bootstrap), doc = "```")]
#[cfg_attr(bootstrap, doc = "```")]
// ^ Needed to avoid tidy warning about odd number of backticks
///
/// {{produces}}
///
Expand Down
6 changes: 3 additions & 3 deletions src/bootstrap/src/core/build_steps/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use crate::core::build_steps::compile::{
};
use crate::core::build_steps::tool;
use crate::core::build_steps::tool::{
COMPILETEST_ALLOW_FEATURES, SourceType, ToolTargetBuildMode, get_tool_target_compiler,
prepare_tool_cargo,
COMPILETEST_ALLOW_FEATURES, SourceType, TEST_FLOAT_PARSE_ALLOW_FEATURES, ToolTargetBuildMode,
get_tool_target_compiler, prepare_tool_cargo,
};
use crate::core::builder::{
self, Alias, Builder, Cargo, Kind, RunConfig, ShouldRun, Step, StepMetadata, crate_description,
Expand Down Expand Up @@ -791,7 +791,7 @@ tool_check_step!(MiroptTestTools {
tool_check_step!(TestFloatParse {
path: "src/tools/test-float-parse",
mode: |_builder| Mode::ToolStd,
allow_features: tool::TestFloatParse::ALLOW_FEATURES
allow_features: TEST_FLOAT_PARSE_ALLOW_FEATURES
});
tool_check_step!(FeaturesStatusDump {
path: "src/tools/features-status-dump",
Expand Down
8 changes: 7 additions & 1 deletion src/bootstrap/src/core/build_steps/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,11 @@ fn doc_std(
}

/// Prepare a compiler that will be able to document something for `target` at `stage`.
fn prepare_doc_compiler(builder: &Builder<'_>, target: TargetSelection, stage: u32) -> Compiler {
pub fn prepare_doc_compiler(
builder: &Builder<'_>,
target: TargetSelection,
stage: u32,
) -> Compiler {
assert!(stage > 0, "Cannot document anything in stage 0");
let build_compiler = builder.compiler(stage - 1, builder.host_target);
builder.std(build_compiler, target);
Expand Down Expand Up @@ -1289,6 +1293,8 @@ impl Step for RustcBook {
// functional sysroot.
builder.std(self.build_compiler, self.target);
let mut cmd = builder.tool_cmd(Tool::LintDocs);
cmd.arg("--build-rustc-stage");
cmd.arg(self.build_compiler.stage.to_string());
cmd.arg("--src");
cmd.arg(builder.src.join("compiler"));
cmd.arg("--out");
Expand Down
Loading
Loading