diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-09 11:33:31 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-09 11:33:31 +0100 |
commit | 6c0cdc5f550c0ccef762fcff7d1fbee9b6245027 (patch) | |
tree | 3e56ee06982fddc9e10127999d4ee7a0e6071399 /crates/ide_completion/src | |
parent | cf4d4f646b6227242b2d4e216e8e30b5e111e02e (diff) | |
parent | b7e6537935d421afd7e02585aaa5cec92bee63b0 (diff) |
Merge #8774
8774: feat: Honor `.cargo/config.toml` r=matklad a=Veykril
![f1Gup1aiAn](https://user-images.githubusercontent.com/3757771/117545448-1dcaae00-b026-11eb-977a-0f35a5e3f2e0.gif)
Implements `cargo/.config` build target and cfg access by using unstable cargo options:
- `cargo config get` to read the target triple out of the config to pass to `cargo metadata` --filter-platform
- `cargo rustc --print` to read out the `rustc_cfgs`, this causes us to honor `rustflags` and the like.
If those commands fail, due to not having a nightly toolchain present for example, they will fall back to invoking rustc directly as we currently do.
I personally think it should be fine to use these unstable options as they are unlikely to change(even if they did it shouldn't be a problem due to the fallback) and don't burden the user if they do not have a nightly toolchain at hand since we fall back to the previous behaviour.
cc #8741
Closes #6604, Closes #5904, Closes #8430, Closes #8480
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/ide_completion/src')
0 files changed, 0 insertions, 0 deletions