diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-06 12:34:34 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-06 12:34:34 +0100 |
commit | 002e72a28de3df818992442ad49bb60d3d0b1d0b (patch) | |
tree | 266da1eafcd60457fa99cc422a415e27992c08d7 /crates/hir_ty/src/infer/unify.rs | |
parent | 047b5313013383fc4fafaef6d6d8d6a64549e3cb (diff) | |
parent | 9fbba7bc45ec6bea9468931d9d9fdd0141826f0a (diff) |
Merge #8366
8366: Add chalk_ir::Const to TyKind::Array r=flodiebold a=Veykril
CC #8313
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/infer/unify.rs')
-rw-r--r-- | crates/hir_ty/src/infer/unify.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/hir_ty/src/infer/unify.rs b/crates/hir_ty/src/infer/unify.rs index c7878ebfd..7d76cda68 100644 --- a/crates/hir_ty/src/infer/unify.rs +++ b/crates/hir_ty/src/infer/unify.rs | |||
@@ -317,9 +317,11 @@ impl InferenceTable { | |||
317 | | (TyKind::Closure(.., substs1), TyKind::Closure(.., substs2)) => { | 317 | | (TyKind::Closure(.., substs1), TyKind::Closure(.., substs2)) => { |
318 | self.unify_substs(substs1, substs2, depth + 1) | 318 | self.unify_substs(substs1, substs2, depth + 1) |
319 | } | 319 | } |
320 | (TyKind::Array(ty1, c1), TyKind::Array(ty2, c2)) if c1 == c2 => { | ||
321 | self.unify_inner(ty1, ty2, depth + 1) | ||
322 | } | ||
320 | (TyKind::Ref(_, _, ty1), TyKind::Ref(_, _, ty2)) | 323 | (TyKind::Ref(_, _, ty1), TyKind::Ref(_, _, ty2)) |
321 | | (TyKind::Raw(_, ty1), TyKind::Raw(_, ty2)) | 324 | | (TyKind::Raw(_, ty1), TyKind::Raw(_, ty2)) |
322 | | (TyKind::Array(ty1), TyKind::Array(ty2)) | ||
323 | | (TyKind::Slice(ty1), TyKind::Slice(ty2)) => self.unify_inner(ty1, ty2, depth + 1), | 325 | | (TyKind::Slice(ty1), TyKind::Slice(ty2)) => self.unify_inner(ty1, ty2, depth + 1), |
324 | _ => true, /* we checked equals_ctor already */ | 326 | _ => true, /* we checked equals_ctor already */ |
325 | } | 327 | } |