Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
-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 53240259e0..c9af4aa263 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -342,6 +342,10 @@ impl Crate {
})
.map(Crate::from)
}
+
+ pub fn is_unstable_feature_enabled(self, db: &dyn HirDatabase, feature: &Symbol) -> bool {
+ crate_def_map(db, self.id).is_unstable_feature_enabled(feature)
+ }
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]