aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-21 18:05:21 +0100
committerGitHub <[email protected]>2021-06-21 18:05:21 +0100
commitf06ddbea6a038eb546d44cb71f2d4d9c055a8828 (patch)
tree9c39a29bdee4f45dcbd497c25350cbfbb0c5e9c3 /crates/hir
parent1b05dbba39d5a4d46f321dc962df99038cddbf21 (diff)
parentae823aa23f1c4fa55e71dd972d0b10c69148b0b4 (diff)
Merge #9080
9080: Improve completion of cfg attributes r=JamieCunliffe a=JamieCunliffe This will close #5398 and it also adds some completion for cfg options. Co-authored-by: Jamie Cunliffe <[email protected]>
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 88490fea9..30cc34403 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -233,6 +233,10 @@ impl Crate {
233 pub fn cfg(&self, db: &dyn HirDatabase) -> CfgOptions { 233 pub fn cfg(&self, db: &dyn HirDatabase) -> CfgOptions {
234 db.crate_graph()[self.id].cfg_options.clone() 234 db.crate_graph()[self.id].cfg_options.clone()
235 } 235 }
236
237 pub fn potential_cfg(&self, db: &dyn HirDatabase) -> CfgOptions {
238 db.crate_graph()[self.id].potential_cfg_options.clone()
239 }
236} 240}
237 241
238#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 242#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]