mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Hide data from public API
This commit is contained in:
parent
d4f4ae0dd8
commit
fe119fef27
3 changed files with 8 additions and 16 deletions
|
@ -10,7 +10,7 @@ use hir_def::{
|
|||
adt::VariantData,
|
||||
body::scope::ExprScopes,
|
||||
builtin_type::BuiltinType,
|
||||
data::{ConstData, TraitData},
|
||||
data::TraitData,
|
||||
nameres::per_ns::PerNs,
|
||||
resolver::{HasResolver, TypeNs},
|
||||
type_ref::TypeRef,
|
||||
|
@ -644,12 +644,8 @@ impl Const {
|
|||
Some(self.module(db).krate())
|
||||
}
|
||||
|
||||
pub fn data(self, db: &impl HirDatabase) -> Arc<ConstData> {
|
||||
db.const_data(self.id)
|
||||
}
|
||||
|
||||
pub fn name(self, db: &impl HirDatabase) -> Option<Name> {
|
||||
self.data(db).name.clone()
|
||||
db.const_data(self.id).name.clone()
|
||||
}
|
||||
|
||||
pub fn infer(self, db: &impl HirDatabase) -> Arc<InferenceResult> {
|
||||
|
@ -695,10 +691,6 @@ impl Static {
|
|||
Some(self.module(db).krate())
|
||||
}
|
||||
|
||||
pub fn data(self, db: &impl HirDatabase) -> Arc<ConstData> {
|
||||
db.static_data(self.id)
|
||||
}
|
||||
|
||||
pub fn infer(self, db: &impl HirDatabase) -> Arc<InferenceResult> {
|
||||
db.infer(self.into())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue