about summary refs log tree commit diff
path: root/crates/cfg
AgeCommit message (Collapse)AuthorLines
2022-07-19Upgrade to expect-test@1.4.0Amos Wenger-1/+1
cf. https://github.com/rust-analyzer/expect-test/issues/33 cf. https://github.com/rust-lang/rust/pull/99444#issuecomment-1188844202
2022-06-10internal: Bump DependenciesLukas Wirth-1/+1
2022-03-22minor: Bump dependenciesLukas Wirth-4/+4
2022-03-21Replace write! with direct callsLaurențiu Nicola-14/+14
2021-12-16Bump MSRV (1.57)iDawer-1/+1
2021-11-05Replace some String usages with SmolStr in completionsLukas Wirth-16/+13
2021-10-23Set MSRVLaurențiu Nicola-0/+1
2021-10-21Migrate to edition 2021Lukas Wirth-1/+1
2021-10-14a few clippy fixesMilo-0/+4
2021-10-09internal: update expectAleksey Kladov-1/+1
2021-08-31Simplify `int_in_range`Jonas Schievink-5/+5
2021-08-31Depend on both crates individuallyJonas Schievink-2/+6
2021-08-30Fix DNF construction, add proptestJonas Schievink-4/+77
2021-08-09internal: remove useless helpersAleksey Kladov-5/+5
We generally avoid "syntax only" helper wrappers, which don't do much: they make code easier to write, but harder to read. They also make investigations harder, as "find_usages" needs to be invoked both for the wrapped and unwrapped APIs
2021-07-20internal: add simple smoke test for project modelAleksey Kladov-1/+16
Our project model code is rather complicated -- the logic for lowering from `cargo metadata` to `CrateGraph` is fiddly and special-case. So far, we survived without testing this at all, but this increasingly seems like a poor option. So this PR introduces a simple tests just to detect the most obvious failures. The idea here is that, although we rely on external processes (cargo & rustc), we are actually using their stable interfaces, so we might just mock out the outputs. Long term, I would like to try to virtualize IO here, so as to do such mocking in a more principled way, but lets start simple. Should we forgo the mocking and just call `cargo metadata` directly perhaps? Touch question -- I personally feel that fast, in-process tests are more important in this case than any extra assurance we get from running the real thing. Super-long term, we would probably want to extend our heavy tests to cover more use-cases, but we should figure a way to do that without slowing the tests down for everyone. Perhaps we need two-tiered bors system, where we pull from `master` into `release` branch only when an additional set of tests passes?
2021-07-05minor: drop dummy authors fieldAleksey Kladov-1/+0
2021-06-21Improve completion of cfg attributesJamie Cunliffe-0/+20
The completion of cfg will look at the enabled cfg keys when performing completion. It will also look crate features when completing a feature cfg option. A fixed list of known values for some cfg options are provided. For unknown keys it will look at the enabled values for that cfg key, which means that completion will only show enabled options for those.
2021-06-19Implement a config override for the default #[cfg(test)] in cargo cratesJade-0/+1
Fixes crates which vanish when the 'test' cfg atom is set. Fix #7243. Fix #9203. Fix #7225.
2021-06-19Fix libcore not being included in rust-lang/rust module treeJade-1/+15
If you are opening libcore from rust-lang/rust as opposed to e.g. goto definition from some other crate which would use the sysroot instance of libcore, a `#![cfg(not(test))]` would previously have made all the code excluded from the module tree, breaking the editor experience. This puts in a slight hack that checks for the crate name "core" and turns off `#[cfg(test)]`.
2021-06-13tree-wide: make rustdoc links spiky so they are clickableJade-2/+2
2021-05-07internal: expose cfg attrs from hir::CrateAleksey Kladov-1/+1
2021-04-04Make `ast_to_token_tree` infallibleJonas Schievink-4/+4
It could never return `None`, so reflect that in the return type
2021-03-21a lot of clippy::style fixesMatthias Krüger-4/+4
2021-02-27Add runnables::related_testsvsrs-1/+1
2021-01-03Upgrade expect-test to 1.1Jesse Bakker-1/+1
2020-12-12Remove some redundant allocationsJeremy Kolb-1/+1
2020-11-17Remove dead codeAleksey Kladov-6/+0
2020-10-23cfg: move tests to separate fileJonas Schievink-208/+195
that way we don't have to re-check the entire project when a test is changed
2020-10-23Reorder itemsJonas Schievink-9/+9
2020-10-22Update crates/cfg/src/cfg_expr.rsJonas Schievink-1/+1
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-10-22Fix typoJonas Schievink-1/+2
2020-10-22Implement DNF-based `#[cfg]` introspectionJonas Schievink-2/+621
2020-10-21Simplify cfg representationJonas Schievink-29/+37
2020-08-24Add description for crates that will be publishedPavan Kumar Sunkara-0/+1
2020-08-24Add version to deps in cargo.tomlPavan Kumar Sunkara-1/+1
2020-08-13Rename ra_cfg -> cfgAleksey Kladov-0/+202