Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/body.rs')
| -rw-r--r-- | crates/hir-def/src/body.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/hir-def/src/body.rs b/crates/hir-def/src/body.rs index d4b4cbe6c7..ea682f5cbd 100644 --- a/crates/hir-def/src/body.rs +++ b/crates/hir-def/src/body.rs @@ -187,6 +187,15 @@ impl Body { pretty::print_body_hir(db, self, owner) } + pub fn pretty_print_expr( + &self, + db: &dyn DefDatabase, + owner: DefWithBodyId, + expr: ExprId, + ) -> String { + pretty::print_expr_hir(db, self, owner, expr) + } + fn new( db: &dyn DefDatabase, owner: DefWithBodyId, |