Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/method_resolution/confirm.rs')
| -rw-r--r-- | crates/hir-ty/src/method_resolution/confirm.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crates/hir-ty/src/method_resolution/confirm.rs b/crates/hir-ty/src/method_resolution/confirm.rs index ffd65a58d8..013b107b30 100644 --- a/crates/hir-ty/src/method_resolution/confirm.rs +++ b/crates/hir-ty/src/method_resolution/confirm.rs @@ -403,7 +403,7 @@ impl<'a, 'b, 'db> ConfirmContext<'a, 'b, 'db> { unreachable!("non-const param ID for const param"); }; let const_ty = self.ctx.db.const_param_ty(const_id); - self.ctx.make_body_const(*konst, const_ty).into() + self.ctx.create_body_anon_const(konst.expr, const_ty, false).into() } _ => unreachable!("unmatching param kinds were passed to `provided_kind()`"), } @@ -411,14 +411,12 @@ impl<'a, 'b, 'db> ConfirmContext<'a, 'b, 'db> { fn provided_type_like_const( &mut self, - type_ref: TypeRefId, - const_ty: Ty<'db>, + _type_ref: TypeRefId, + _const_ty: Ty<'db>, arg: TypeLikeConst<'_>, ) -> Const<'db> { match arg { - TypeLikeConst::Path(path) => { - self.ctx.make_path_as_body_const(type_ref, path, const_ty) - } + TypeLikeConst::Path(path) => self.ctx.make_path_as_body_const(path), TypeLikeConst::Infer => self.ctx.table.next_const_var(Span::Dummy), } } |