diff options
| author | Chayim Refael Friedman <chayimfr@gmail.com> | 2024-08-12 02:47:31 +0300 |
|---|---|---|
| committer | Chayim Refael Friedman <chayimfr@gmail.com> | 2024-08-12 22:03:16 +0300 |
| commit | aa6e8d3db553721eed97d5b6afc64d44eb9f8a2b (patch) | |
| tree | e78b3cd802e11e0c27d3f02a987abaebd3efa576 /src/tools/rust-analyzer/docs | |
| parent | ec03068320956bedd5defea43d3634a58908c493 (diff) | |
| download | rust-aa6e8d3db553721eed97d5b6afc64d44eb9f8a2b.tar.gz rust-aa6e8d3db553721eed97d5b6afc64d44eb9f8a2b.zip | |
Allow declaring cfg groups in rust-project.json, to help sharing common cfgs
Diffstat (limited to 'src/tools/rust-analyzer/docs')
| -rw-r--r-- | src/tools/rust-analyzer/docs/user/manual.adoc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/docs/user/manual.adoc b/src/tools/rust-analyzer/docs/user/manual.adoc index 703ec66921c..246ebdab2c9 100644 --- a/src/tools/rust-analyzer/docs/user/manual.adoc +++ b/src/tools/rust-analyzer/docs/user/manual.adoc @@ -705,6 +705,12 @@ interface JsonProject { /// several different "sysroots" in one graph of /// crates. sysroot_src?: string; + /// List of groups of common cfg values, to allow + /// sharing them between crates. + /// + /// Maps from group name to its cfgs. Cfg follow + /// the same format as `Crate.cfg`. + cfg_groups?: { [key: string]: string[]; }; /// The set of crates comprising the current /// project. Must include all transitive /// dependencies as well as sysroot crate (libstd, @@ -754,6 +760,12 @@ interface Crate { include_dirs: string[], exclude_dirs: string[], }, + /// List of cfg groups this crate inherits. + /// + /// All cfg in these groups will be concatenated to + /// `cfg`. It is impossible to replace a value from + /// the groups. + cfg_groups?: string[]; /// The set of cfgs activated for a given crate, like /// `["unix", "feature=\"foo\"", "feature=\"bar\""]`. cfg: string[]; |
