`cargo rustc -- <args>` first builds dependencies then calls `rustc <args>` for the current package. Here, we don't want to build dependencies, we just want to call `rustc --print`. An unstable `cargo rustc` `--print` command bypasses building dependencies first. This speeds up execution of this code path and ensures RA doesn't recompile dependencies with the `RUSTC_BOOTSRAP=1` env var flag set. Note that we must pass `-Z unstable-options` twice, first to enable the `cargo` unstable `--print` flag, then later to enable the unstable `rustc` `target-spec-json` print request. |
||
|---|---|---|
| .. | ||
| build_scripts.rs | ||
| cargo_workspace.rs | ||
| cfg_flag.rs | ||
| lib.rs | ||
| manifest_path.rs | ||
| project_json.rs | ||
| rustc_cfg.rs | ||
| sysroot.rs | ||
| target_data_layout.rs | ||
| tests.rs | ||
| workspace.rs | ||