Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/closure.rs')
| -rw-r--r-- | crates/hir-ty/src/infer/closure.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir-ty/src/infer/closure.rs b/crates/hir-ty/src/infer/closure.rs index c3918286f4..a7d9246b7c 100644 --- a/crates/hir-ty/src/infer/closure.rs +++ b/crates/hir-ty/src/infer/closure.rs @@ -710,14 +710,14 @@ impl InferenceContext<'_> { false } - fn is_ty_copy(&self, ty: Ty) -> bool { + fn is_ty_copy(&mut self, ty: Ty) -> bool { if let TyKind::Closure(id, _) = ty.kind(Interner) { // FIXME: We handle closure as a special case, since chalk consider every closure as copy. We // should probably let chalk know which closures are copy, but I don't know how doing it // without creating query cycles. return self.result.closure_info.get(id).map(|x| x.1 == FnTrait::Fn).unwrap_or(true); } - ty.is_copy(self.db, self.owner) + self.table.resolve_completely(ty).is_copy(self.db, self.owner) } fn select_from_expr(&mut self, expr: ExprId) { |