From 284483b347d15bee3a7bf293d33e5f19a9740102 Mon Sep 17 00:00:00 2001 From: Jamie Cunliffe Date: Sun, 30 May 2021 14:52:19 +0100 Subject: Improve completion of cfg attributes 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. --- crates/base_db/src/fixture.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/base_db/src/fixture.rs') diff --git a/crates/base_db/src/fixture.rs b/crates/base_db/src/fixture.rs index 6ce377710..6d3b1266e 100644 --- a/crates/base_db/src/fixture.rs +++ b/crates/base_db/src/fixture.rs @@ -131,6 +131,7 @@ impl ChangeFixture { meta.cfg, meta.env, Default::default(), + Default::default(), ); let prev = crates.insert(crate_name.clone(), crate_id); assert!(prev.is_none()); @@ -160,6 +161,7 @@ impl ChangeFixture { default_cfg, Env::default(), Default::default(), + Default::default(), ); } else { for (from, to) in crate_deps { -- cgit v1.2.3