aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
authorJosh Mcguigan <[email protected]>2021-03-07 00:56:07 +0000
committerJosh Mcguigan <[email protected]>2021-03-12 21:36:13 +0000
commit53bb46fa853bee99f673a0ed0a53798c46847d99 (patch)
treed692b9f6255109c88e3805408be3bf6dd5c8ec76 /crates/hir
parent437527b22612a17024751c78f69715e625bf6a96 (diff)
show function params in completion detail
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/lib.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 58adc8fd3..8d082994a 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -921,6 +921,14 @@ impl SelfParam {
921 }) 921 })
922 .unwrap_or(Access::Owned) 922 .unwrap_or(Access::Owned)
923 } 923 }
924
925 pub fn display(self, db: &dyn HirDatabase) -> &'static str {
926 match self.access(db) {
927 Access::Shared => "&self",
928 Access::Exclusive => "&mut self",
929 Access::Owned => "self",
930 }
931 }
924} 932}
925 933
926impl HasVisibility for Function { 934impl HasVisibility for Function {