mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
show function params in completion detail
This commit is contained in:
parent
437527b226
commit
53bb46fa85
8 changed files with 155 additions and 82 deletions
|
@ -921,6 +921,14 @@ impl SelfParam {
|
|||
})
|
||||
.unwrap_or(Access::Owned)
|
||||
}
|
||||
|
||||
pub fn display(self, db: &dyn HirDatabase) -> &'static str {
|
||||
match self.access(db) {
|
||||
Access::Shared => "&self",
|
||||
Access::Exclusive => "&mut self",
|
||||
Access::Owned => "self",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl HasVisibility for Function {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue