From 9fbba7bc45ec6bea9468931d9d9fdd0141826f0a Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Tue, 6 Apr 2021 11:45:41 +0200 Subject: Add chalk_ir::Const to TyKind::Array --- crates/hir_ty/src/method_resolution.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/hir_ty/src/method_resolution.rs') diff --git a/crates/hir_ty/src/method_resolution.rs b/crates/hir_ty/src/method_resolution.rs index 436dea22b..5042bfbca 100644 --- a/crates/hir_ty/src/method_resolution.rs +++ b/crates/hir_ty/src/method_resolution.rs @@ -842,7 +842,9 @@ fn autoderef_method_receiver( ) -> Vec> { let mut deref_chain: Vec<_> = autoderef::autoderef(db, Some(krate), ty).collect(); // As a last step, we can do array unsizing (that's the only unsizing that rustc does for method receivers!) - if let Some(TyKind::Array(parameters)) = deref_chain.last().map(|ty| ty.value.kind(&Interner)) { + if let Some(TyKind::Array(parameters, _)) = + deref_chain.last().map(|ty| ty.value.kind(&Interner)) + { let kinds = deref_chain.last().unwrap().binders.clone(); let unsized_ty = TyKind::Slice(parameters.clone()).intern(&Interner); deref_chain.push(Canonical { value: unsized_ty, binders: kinds }) -- cgit v1.2.3