mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Handle visibility in method call completion
This commit is contained in:
parent
aff82cf7ac
commit
734e68da4c
3 changed files with 54 additions and 4 deletions
|
@ -571,6 +571,14 @@ impl Function {
|
|||
}
|
||||
}
|
||||
|
||||
impl HasVisibility for Function {
|
||||
fn visibility(&self, db: &impl HirDatabase) -> Visibility {
|
||||
let function_data = db.function_data(self.id);
|
||||
let visibility = &function_data.visibility;
|
||||
visibility.resolve(db, &self.id.resolver(db))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct Const {
|
||||
pub(crate) id: ConstId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue