diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-10-05 15:25:59 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-10-05 15:25:59 +0100 |
commit | ae6305b90c80eb919cfde985cba66975b6222ed2 (patch) | |
tree | de601daf3714c4bda937e7cad05d048b69d16e71 /Cargo.lock | |
parent | dbf869b4d2dac09df17609edf6e67c1611b71dc5 (diff) | |
parent | c6303d9fee98232ac83a77f943c39d65c9c6b6db (diff) |
Merge #1928
1928: Support `#[cfg(..)]` r=matklad a=oxalica
This PR implement `#[cfg(..)]` conditional compilation. It read default cfg options from `rustc --print cfg` with also hard-coded `test` and `debug_assertion` enabled.
Front-end settings are **not** included in this PR.
There is also a known issue that inner control attributes are totally ignored. I think it is **not** a part of `cfg` and create a separated issue for it. #1949
Fixes #1920
Related: #1073
Co-authored-by: uHOOCCOOHu <[email protected]>
Co-authored-by: oxalica <[email protected]>
Diffstat (limited to 'Cargo.lock')
-rw-r--r-- | Cargo.lock | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock index 988f7ec0b..736f1994e 100644 --- a/Cargo.lock +++ b/Cargo.lock | |||
@@ -923,6 +923,16 @@ dependencies = [ | |||
923 | ] | 923 | ] |
924 | 924 | ||
925 | [[package]] | 925 | [[package]] |
926 | name = "ra_cfg" | ||
927 | version = "0.1.0" | ||
928 | dependencies = [ | ||
929 | "ra_mbe 0.1.0", | ||
930 | "ra_syntax 0.1.0", | ||
931 | "ra_tt 0.1.0", | ||
932 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", | ||
933 | ] | ||
934 | |||
935 | [[package]] | ||
926 | name = "ra_cli" | 936 | name = "ra_cli" |
927 | version = "0.1.0" | 937 | version = "0.1.0" |
928 | dependencies = [ | 938 | dependencies = [ |
@@ -941,6 +951,7 @@ dependencies = [ | |||
941 | name = "ra_db" | 951 | name = "ra_db" |
942 | version = "0.1.0" | 952 | version = "0.1.0" |
943 | dependencies = [ | 953 | dependencies = [ |
954 | "ra_cfg 0.1.0", | ||
944 | "ra_prof 0.1.0", | 955 | "ra_prof 0.1.0", |
945 | "ra_syntax 0.1.0", | 956 | "ra_syntax 0.1.0", |
946 | "relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", | 957 | "relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
@@ -971,6 +982,7 @@ dependencies = [ | |||
971 | "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", | 982 | "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", |
972 | "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", | 983 | "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", |
973 | "ra_arena 0.1.0", | 984 | "ra_arena 0.1.0", |
985 | "ra_cfg 0.1.0", | ||
974 | "ra_db 0.1.0", | 986 | "ra_db 0.1.0", |
975 | "ra_mbe 0.1.0", | 987 | "ra_mbe 0.1.0", |
976 | "ra_prof 0.1.0", | 988 | "ra_prof 0.1.0", |
@@ -993,6 +1005,7 @@ dependencies = [ | |||
993 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | 1005 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", |
994 | "proptest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", | 1006 | "proptest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", |
995 | "ra_assists 0.1.0", | 1007 | "ra_assists 0.1.0", |
1008 | "ra_cfg 0.1.0", | ||
996 | "ra_db 0.1.0", | 1009 | "ra_db 0.1.0", |
997 | "ra_fmt 0.1.0", | 1010 | "ra_fmt 0.1.0", |
998 | "ra_hir 0.1.0", | 1011 | "ra_hir 0.1.0", |
@@ -1019,6 +1032,7 @@ dependencies = [ | |||
1019 | "lsp-server 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1032 | "lsp-server 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1020 | "lsp-types 0.61.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1033 | "lsp-types 0.61.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1021 | "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1034 | "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1035 | "ra_cfg 0.1.0", | ||
1022 | "ra_db 0.1.0", | 1036 | "ra_db 0.1.0", |
1023 | "ra_ide_api 0.1.0", | 1037 | "ra_ide_api 0.1.0", |
1024 | "ra_prof 0.1.0", | 1038 | "ra_prof 0.1.0", |
@@ -1075,6 +1089,7 @@ dependencies = [ | |||
1075 | "cargo_metadata 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", | 1089 | "cargo_metadata 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", |
1076 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | 1090 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", |
1077 | "ra_arena 0.1.0", | 1091 | "ra_arena 0.1.0", |
1092 | "ra_cfg 0.1.0", | ||
1078 | "ra_db 0.1.0", | 1093 | "ra_db 0.1.0", |
1079 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", | 1094 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", |
1080 | "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", | 1095 | "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", |