Skip to content

Commit 7179be8

Browse files
Don't apply semicolon in expressions from macros yet
std_detect is still using this and as it's in a submodule updating it will be a pain. We can catch this either after a stdarch submodule bump or just on the next cycle.
1 parent 3733275 commit 7179be8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/bootstrap/bootstrap.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,8 @@ def build_bootstrap(self):
877877
target_linker = self.get_toml("linker", build_section)
878878
if target_linker is not None:
879879
env["RUSTFLAGS"] += " -C linker=" + target_linker
880-
env["RUSTFLAGS"] += " -Wrust_2018_idioms -Wunused_lifetimes -Wsemicolon_in_expressions_from_macros"
880+
# cfg(bootstrap): Add `-Wsemicolon_in_expressions_from_macros` after the next beta bump
881+
env["RUSTFLAGS"] += " -Wrust_2018_idioms -Wunused_lifetimes"
881882
if self.get_toml("deny-warnings", "rust") != "false":
882883
env["RUSTFLAGS"] += " -Dwarnings"
883884

src/bootstrap/builder.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,12 @@ impl<'a> Builder<'a> {
12791279
// some code doesn't go through this `rustc` wrapper.
12801280
lint_flags.push("-Wrust_2018_idioms");
12811281
lint_flags.push("-Wunused_lifetimes");
1282-
lint_flags.push("-Wsemicolon_in_expressions_from_macros");
1282+
// cfg(bootstrap): unconditionally enable this warning after the next beta bump
1283+
// This is currently disabled for the stage1 libstd, since build scripts
1284+
// will end up using the bootstrap compiler (which doesn't yet support this lint)
1285+
if compiler.stage != 0 && mode != Mode::Std {
1286+
lint_flags.push("-Wsemicolon_in_expressions_from_macros");
1287+
}
12831288

12841289
if self.config.deny_warnings {
12851290
lint_flags.push("-Dwarnings");

0 commit comments

Comments
 (0)