rust-analyzer/crates
bors[bot] ae6305b90c
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 <hooccooh1896@gmail.com>
Co-authored-by: oxalica <oxalicc@pm.me>
2019-10-05 14:25:59 +00:00
..
ra_arena cleanup 2019-08-06 10:57:16 +02:00
ra_assists [#1807] Refactor file structure 2019-10-04 10:51:41 +02:00
ra_batch Read default cfgs from rustc 2019-10-03 02:28:03 +08:00
ra_cfg Add docs 2019-10-03 02:50:22 +08:00
ra_cli Update pico-args 2019-10-02 10:58:15 -04:00
ra_db Enable CfgOptions test for workspace crates 2019-10-03 02:28:02 +08:00
ra_fmt fix hir for new block syntax 2019-09-02 21:23:19 +03:00
ra_hir Merge #1928 2019-10-05 14:25:59 +00:00
ra_ide_api Refactor CfgOptions inside 2019-10-03 02:28:02 +08:00
ra_lsp_server Use raw cfgs in json project and fix typo 2019-10-05 20:55:27 +08:00
ra_mbe Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
ra_parser Fix parsing of block expressions in "forbid_structs" contexts. 2019-10-03 00:39:52 -07:00
ra_prof Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
ra_project_model Use raw cfgs in json project and fix typo 2019-10-05 20:55:27 +08:00
ra_syntax Merge #1928 2019-10-05 14:25:59 +00:00
ra_text_edit Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
ra_tools Update pico-args 2019-10-02 10:58:15 -04:00
ra_tt Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
ra_vfs_glob add option to disable notify 2019-09-06 17:21:29 +03:00
test_utils Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00