File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -917,6 +917,19 @@ def build_bootstrap_cmd(self, env):
917917 if toml_val is not None :
918918 env ["{}_{}" .format (var_name , host_triple_sanitized )] = toml_val
919919
920+ # In src/etc/rust_analyzer_settings.json, we configure rust-analyzer to
921+ # pass RUSTC_BOOTSTRAP=1 to all cargo invocations because the standard
922+ # library uses unstable Cargo features. Without RUSTC_BOOTSTRAP,
923+ # rust-analyzer would fail to fetch workspace layout when the system's
924+ # default toolchain is not nightly.
925+ #
926+ # But that setting has the collateral effect of rust-analyzer also
927+ # passing RUSTC_BOOTSTRAP=1 to all x.py invocations too (the various
928+ # overrideCommand). For compiling bootstrap, that is unwanted and can
929+ # cause spurious rebuilding of bootstrap when rust-analyzer x.py
930+ # invocations are interleaved with handwritten ones on the command line.
931+ env .pop ("RUSTC_BOOTSTRAP" , None )
932+
920933 # preserve existing RUSTFLAGS
921934 env .setdefault ("RUSTFLAGS" , "" )
922935
You can’t perform that action at this time.
0 commit comments