Unnamed repository; edit this file 'description' to name the repository.
Accept an ExpressionStoreOwnerId for pretty-printing
And not a DefWithBodyId.
Chayim Refael Friedman 5 weeks ago
parent 271cf3e · commit 317f4f9
-rw-r--r--crates/hir-def/src/expr_store/body.rs4
-rw-r--r--crates/hir-def/src/expr_store/pretty.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir-def/src/expr_store/body.rs b/crates/hir-def/src/expr_store/body.rs
index 0c8320369f..6be3e49a70 100644
--- a/crates/hir-def/src/expr_store/body.rs
+++ b/crates/hir-def/src/expr_store/body.rs
@@ -133,7 +133,7 @@ impl Body {
expr: ExprId,
edition: Edition,
) -> String {
- pretty::print_expr_hir(db, self, owner, expr, edition)
+ pretty::print_expr_hir(db, self, owner.into(), expr, edition)
}
pub fn pretty_print_pat(
@@ -144,7 +144,7 @@ impl Body {
oneline: bool,
edition: Edition,
) -> String {
- pretty::print_pat_hir(db, self, owner, pat, oneline, edition)
+ pretty::print_pat_hir(db, self, owner.into(), pat, oneline, edition)
}
}
diff --git a/crates/hir-def/src/expr_store/pretty.rs b/crates/hir-def/src/expr_store/pretty.rs
index 71d59c904d..70ea54c734 100644
--- a/crates/hir-def/src/expr_store/pretty.rs
+++ b/crates/hir-def/src/expr_store/pretty.rs
@@ -401,7 +401,7 @@ fn print_generic_params(db: &dyn DefDatabase, generic_params: &GenericParams, p:
pub fn print_expr_hir(
db: &dyn DefDatabase,
store: &ExpressionStore,
- _owner: DefWithBodyId,
+ _owner: ExpressionStoreOwnerId,
expr: ExprId,
edition: Edition,
) -> String {
@@ -420,7 +420,7 @@ pub fn print_expr_hir(
pub fn print_pat_hir(
db: &dyn DefDatabase,
store: &ExpressionStore,
- _owner: DefWithBodyId,
+ _owner: ExpressionStoreOwnerId,
pat: PatId,
oneline: bool,
edition: Edition,