@@ -277,16 +277,20 @@ def do_semver_checks(cfg: Cfg, target: Target) -> None:
277277
278278 env = os .environ .copy ()
279279 env .setdefault ("RUSTFLAGS" , "" )
280+ env .setdefault ("RUSTDOCFLAGS" , "" )
281+ # Needed for rustdoc json
282+ env ["RUSTC_BOOTSTRAP" ] = "1"
283+
280284 cmd = ["cargo" , "rustdoc" , "--target" , tname ]
281285 rustdoc_args = ["--" , "-Zunstable-options" , "--output-format=json" ]
282286
283- run ([* cmd , * rustdoc_args ], env = env | { "RUSTC_BOOTSTRAP" : "1" } )
287+ run ([* cmd , * rustdoc_args ], env = env )
284288
285- env [ "RUSTFLAGS" ] += " -Awarnings" # Don't lint the baseline
286- run (
287- [ * cmd , "--manifest-path" , cfg . baseline_crate_dir , * rustdoc_args ],
288- env = env | { "RUSTC_BOOTSTRAP" : "1" },
289- )
289+ # Don't lint the baseline
290+ env [ "RUSTFLAGS" ] += " -Awarnings"
291+ env [ "RUSTDOCFLAGS" ] += " -Awarnings"
292+
293+ run ([ * cmd , "--manifest-path" , cfg . baseline_crate_dir , * rustdoc_args ], env = env )
290294 baseline = cfg .baseline_crate_dir / "target" / tname / "libc.json"
291295 current = Path ("target" ) / tname / "libc.json"
292296
0 commit comments