Now that they're const it's no longer needed.
Nothing manual was performed: only a regexp search of `sym::([\w][\w\d]*)\.clone\(\)` and replace by `sym::$1`.
this makes three changes:
- all callsites of `toolchain::command` are changed to use
`command(path, extra_env)`, instead of manually adding the env after
the fact.
- all `map<str, str>` are changed to `map<str, option<str>>`.
- `command` checks for None and calls `env_remove` if so.
this caught several places where environment variables weren't being
propagated:
- when running `rustc --print=target-libdir`
- when running `cargo rustc -- --print=target-spec-json`
- when running the custom DiscoverLinkedProjects config. I *think* this
is for use with non-cargo build systems, so I didn't change it.
fix test running by invoking cargo per package
remove hack_recover_crate_name
make clippy happy
fix testing for packages with multiple targets
fix test running by invoking cargo per package
remove hack_recover_crate_name
make clippy happy
fix testing for packages with multiple targets
fix bad merge
replace TargetKind::fmt with TargetKind::as_cargo_target to clarify intention
dedupulicate requested test runs
replace ParseFromLine with CargoParser
formatting - remove trailing space
formatting for rustfmt CI
Ensure that all the fields that rust-analyzer understands are in the
manual, they all have doc comments, and they use consistent
punctuation (`;` rather than mixing `,` and `;`).
Whilst we're here, fix the `sysroot_src` example and add 2024 as a
legal value for Rust edition.
If the user doesn't have rustc on $PATH, rust-analyzer won't be able
to run `rustc --print cfg`. This isn't really an error, as
rust-analyzer can still proceed without it.
This is particularly noticeable when loading crates defined in a
rust-project.json. Until the configuration is loaded, the opened files
are briefly treated as detached files and users see this error.
Environments with rust-project.json generally have a sysroot and rustc
elsewhere, so the error confuses users.