Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/specialization.rs')
-rw-r--r--crates/hir-ty/src/specialization.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/crates/hir-ty/src/specialization.rs b/crates/hir-ty/src/specialization.rs
index 8bc6c51fae..a0bac48250 100644
--- a/crates/hir-ty/src/specialization.rs
+++ b/crates/hir-ty/src/specialization.rs
@@ -1,10 +1,9 @@
//! Impl specialization related things
use hir_def::{
- ExpressionStoreOwnerId, GenericDefId, HasModule, ImplId, nameres::crate_def_map,
- signatures::ImplSignature,
+ ExpressionStoreOwnerId, GenericDefId, HasModule, ImplId, signatures::ImplSignature,
+ unstable_features::UnstableFeatures,
};
-use intern::sym;
use tracing::debug;
use crate::{
@@ -153,10 +152,8 @@ pub(crate) fn specializes(
// `#[allow_internal_unstable(specialization)]`, but `#[allow_internal_unstable]`
// is an internal feature, std is not using it for specialization nor is likely to
// ever use it, and we don't have the span information necessary to replicate that.
- let def_map = crate_def_map(db, module.krate(db));
- if !def_map.is_unstable_feature_enabled(&sym::specialization)
- && !def_map.is_unstable_feature_enabled(&sym::min_specialization)
- {
+ let features = UnstableFeatures::query(db, module.krate(db));
+ if !features.specialization && !features.min_specialization {
return false;
}