diff options
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index c5114742b..fdf316745 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -118,7 +118,7 @@ impl_froms!( | |||
118 | BuiltinType | 118 | BuiltinType |
119 | ); | 119 | ); |
120 | 120 | ||
121 | pub use hir_def::{attr::Attrs, visibility::ResolvedVisibility}; | 121 | pub use hir_def::{attr::Attrs, visibility::Visibility}; |
122 | 122 | ||
123 | impl Module { | 123 | impl Module { |
124 | pub(crate) fn new(krate: Crate, crate_module_id: LocalModuleId) -> Module { | 124 | pub(crate) fn new(krate: Crate, crate_module_id: LocalModuleId) -> Module { |
@@ -256,7 +256,7 @@ impl StructField { | |||
256 | } | 256 | } |
257 | 257 | ||
258 | impl HasVisibility for StructField { | 258 | impl HasVisibility for StructField { |
259 | fn visibility(&self, db: &impl HirDatabase) -> ResolvedVisibility { | 259 | fn visibility(&self, db: &impl HirDatabase) -> Visibility { |
260 | let struct_field_id: hir_def::StructFieldId = (*self).into(); | 260 | let struct_field_id: hir_def::StructFieldId = (*self).into(); |
261 | let visibility = db.visibility(struct_field_id.into()); | 261 | let visibility = db.visibility(struct_field_id.into()); |
262 | let parent_id: hir_def::VariantId = self.parent.into(); | 262 | let parent_id: hir_def::VariantId = self.parent.into(); |
@@ -1052,7 +1052,7 @@ impl<T: Into<AttrDef> + Copy> Docs for T { | |||
1052 | } | 1052 | } |
1053 | 1053 | ||
1054 | pub trait HasVisibility { | 1054 | pub trait HasVisibility { |
1055 | fn visibility(&self, db: &impl HirDatabase) -> ResolvedVisibility; | 1055 | fn visibility(&self, db: &impl HirDatabase) -> Visibility; |
1056 | fn visible_from(&self, db: &impl HirDatabase, module: Module) -> bool { | 1056 | fn visible_from(&self, db: &impl HirDatabase, module: Module) -> bool { |
1057 | let vis = self.visibility(db); | 1057 | let vis = self.visibility(db); |
1058 | vis.visible_from(db, module.id) | 1058 | vis.visible_from(db, module.id) |