From 020d83d9f5fd26cfe264b1869e7b87bff78b5a9d Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Sat, 13 Mar 2021 12:46:33 -0500 Subject: [PATCH] Enable `-W semicolon_in_expressions_from_macros` in bootstrap Now that stdarch has been updated, we can do this without breaking the build. --- src/bootstrap/bootstrap.py | 2 +- src/bootstrap/builder.rs | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 356d9f5d1ff27..149a899cef7a0 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -900,8 +900,8 @@ def build_bootstrap(self): target_linker = self.get_toml("linker", build_section) if target_linker is not None: env["RUSTFLAGS"] += " -C linker=" + target_linker - # cfg(bootstrap): Add `-Wsemicolon_in_expressions_from_macros` after the next beta bump env["RUSTFLAGS"] += " -Wrust_2018_idioms -Wunused_lifetimes" + env["RUSTFLAGS"] += " -Wsemicolon_in_expressions_from_macros" if self.get_toml("deny-warnings", "rust") != "false": env["RUSTFLAGS"] += " -Dwarnings" diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 62a3a87eeb850..5604e14f2d594 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -1270,12 +1270,7 @@ impl<'a> Builder<'a> { // some code doesn't go through this `rustc` wrapper. lint_flags.push("-Wrust_2018_idioms"); lint_flags.push("-Wunused_lifetimes"); - // cfg(bootstrap): unconditionally enable this warning after the next beta bump - // This is currently disabled for the stage1 libstd, since build scripts - // will end up using the bootstrap compiler (which doesn't yet support this lint) - if compiler.stage != 0 && mode != Mode::Std { - lint_flags.push("-Wsemicolon_in_expressions_from_macros"); - } + lint_flags.push("-Wsemicolon_in_expressions_from_macros"); if self.config.deny_warnings { lint_flags.push("-Dwarnings");