rust-analyzer/crates/ra_hir/src
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
..
code_model Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
expr Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
nameres Optimize 2019-10-03 02:28:03 +08:00
ty Merge #1928 2019-10-05 14:25:59 +00:00
adt.rs Refactor Name ready for hygienic macro 2019-09-27 02:04:47 +08:00
attr.rs Add docs 2019-10-03 02:50:22 +08:00
code_model.rs Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
db.rs Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
debug.rs document module 2019-09-09 17:31:11 +03:00
diagnostics.rs Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
either.rs Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
expr.rs Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
from_source.rs Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
generics.rs Support $crate in item and expr place. 2019-09-27 02:05:06 +08:00
ids.rs Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
impl_block.rs Optimize 2019-10-03 02:28:03 +08:00
lang_item.rs Merge branch 'master' into feature/issue/1856 2019-09-30 12:07:26 +03:00
lib.rs Introduce ra_cfg to parse and evaluate CfgExpr 2019-10-03 02:28:02 +08:00
marks.rs Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
mock.rs Enable CfgOptions test for workspace crates 2019-10-03 02:28:02 +08:00
name.rs Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
nameres.rs Fix 2019-09-27 10:55:25 +08:00
path.rs Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
resolve.rs Handle associated type shorthand (T::Item) 2019-09-22 20:02:32 +02:00
source_binder.rs Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
source_id.rs Added test for check doc strings in crates. 2019-09-30 11:58:53 +03:00
traits.rs Remove TraitItem and ImplItem in favor of AssocItem 2019-09-17 19:47:45 +02:00
ty.rs Add SubstsBuilder 2019-09-26 23:03:39 +02:00
type_alias.rs allow rustfmt to reorder imports 2019-07-04 23:09:09 +03:00
type_ref.rs Support $crate in item and expr place. 2019-09-27 02:05:06 +08:00