Skip to content

Commit 317f4f9

Browse files
Accept an ExpressionStoreOwnerId for pretty-printing
And not a DefWithBodyId.
1 parent 271cf3e commit 317f4f9

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

crates/hir-def/src/expr_store/body.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl Body {
133133
expr: ExprId,
134134
edition: Edition,
135135
) -> String {
136-
pretty::print_expr_hir(db, self, owner, expr, edition)
136+
pretty::print_expr_hir(db, self, owner.into(), expr, edition)
137137
}
138138

139139
pub fn pretty_print_pat(
@@ -144,7 +144,7 @@ impl Body {
144144
oneline: bool,
145145
edition: Edition,
146146
) -> String {
147-
pretty::print_pat_hir(db, self, owner, pat, oneline, edition)
147+
pretty::print_pat_hir(db, self, owner.into(), pat, oneline, edition)
148148
}
149149
}
150150

crates/hir-def/src/expr_store/pretty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ fn print_generic_params(db: &dyn DefDatabase, generic_params: &GenericParams, p:
401401
pub fn print_expr_hir(
402402
db: &dyn DefDatabase,
403403
store: &ExpressionStore,
404-
_owner: DefWithBodyId,
404+
_owner: ExpressionStoreOwnerId,
405405
expr: ExprId,
406406
edition: Edition,
407407
) -> String {
@@ -420,7 +420,7 @@ pub fn print_expr_hir(
420420
pub fn print_pat_hir(
421421
db: &dyn DefDatabase,
422422
store: &ExpressionStore,
423-
_owner: DefWithBodyId,
423+
_owner: ExpressionStoreOwnerId,
424424
pat: PatId,
425425
oneline: bool,
426426
edition: Edition,

0 commit comments

Comments
 (0)