diff options
| author | bors <bors@rust-lang.org> | 2023-05-08 04:50:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-08 04:50:28 +0000 |
| commit | ea0c22ea4f58f181d6739fbe624329e576ce7994 (patch) | |
| tree | 5e3dea659dd2ed390720bb92f62ef287b1c8e41f /src/bootstrap/compile.rs | |
| parent | 04c53444dff325a0a3a4cb88cb952fbf341861ec (diff) | |
| parent | 4e7c14fe9f03dd0189f954bd9cb97c3c513e7eed (diff) | |
Auto merge of #106621 - ozkanonur:enable-elided-lifetimes-for-doctests, r=Mark-Simulacrum
enable `rust_2018_idioms` lint group for doctests With this change, `rust_2018_idioms` lint group will be enabled for compiler/libstd doctests. Resolves #106086 Resolves #99144 Signed-off-by: ozkanonur <work@onurozkan.dev>
Diffstat (limited to 'src/bootstrap/compile.rs')
| -rw-r--r-- | src/bootstrap/compile.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 966ae00fa1d..33addb90da3 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -412,6 +412,8 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car format!("-Zcrate-attr=doc(html_root_url=\"{}/\")", builder.doc_rust_lang_org_channel(),); cargo.rustflag(&html_root); cargo.rustdocflag(&html_root); + + cargo.rustdocflag("-Zcrate-attr=warn(rust_2018_idioms)"); } #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -810,6 +812,9 @@ pub fn rustc_cargo(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetSelec .arg(builder.rustc_features(builder.kind)) .arg("--manifest-path") .arg(builder.src.join("compiler/rustc/Cargo.toml")); + + cargo.rustdocflag("-Zcrate-attr=warn(rust_2018_idioms)"); + rustc_cargo_env(builder, cargo, target, stage); } |
