Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/expr.rs')
| -rw-r--r-- | crates/hir-ty/src/infer/expr.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/hir-ty/src/infer/expr.rs b/crates/hir-ty/src/infer/expr.rs index 33e98ac86c..194471f004 100644 --- a/crates/hir-ty/src/infer/expr.rs +++ b/crates/hir-ty/src/infer/expr.rs @@ -173,8 +173,8 @@ impl<'a> InferenceContext<'a> { } Expr::Const(id) => { self.with_breakable_ctx(BreakableKind::Border, None, None, |this| { - let (_, expr) = this.db.lookup_intern_anonymous_const(*id); - this.infer_expr(expr, expected) + let loc = this.db.lookup_intern_anonymous_const(*id); + this.infer_expr(loc.root, expected) }) .1 } @@ -1715,6 +1715,7 @@ impl<'a> InferenceContext<'a> { const_or_path_to_chalk( this.db, &this.resolver, + this.owner.into(), ty, c, ParamLoweringMode::Placeholder, |