diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-27 18:00:08 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-27 18:00:08 +0000 |
commit | 19f77603c0aed92ec70a836dae4d447b8fcab922 (patch) | |
tree | a1739442c9f79c5c6addc0efc7d25a7da678ce02 /crates/ra_hir/src/code_model_api.rs | |
parent | 3f4f50baaa21cb2d0f6c102f1ca521946071a8dc (diff) | |
parent | 6249989e6c133792ff457896d4723c0eb0f42137 (diff) |
Merge #661
661: Implement type generics for functions r=flodiebold a=marcusklaas
Pretty printing of function types isn't as nice any more since the current implementation does not store its argument types directly. We could store some more information to print more information on the argument and return types, at a cost of course.
Co-authored-by: Marcus Klaas de Vries <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/code_model_api.rs')
-rw-r--r-- | crates/ra_hir/src/code_model_api.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index 191104890..e4008058c 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs | |||
@@ -424,6 +424,10 @@ impl Function { | |||
424 | self.id.module(db) | 424 | self.id.module(db) |
425 | } | 425 | } |
426 | 426 | ||
427 | pub fn name(&self, db: &impl HirDatabase) -> Name { | ||
428 | self.signature(db).name.clone() | ||
429 | } | ||
430 | |||
427 | pub fn body_syntax_mapping(&self, db: &impl HirDatabase) -> Arc<BodySyntaxMapping> { | 431 | pub fn body_syntax_mapping(&self, db: &impl HirDatabase) -> Arc<BodySyntaxMapping> { |
428 | db.body_syntax_mapping(*self) | 432 | db.body_syntax_mapping(*self) |
429 | } | 433 | } |