From 42217738e0b121a8e5d48a9a55cb51ef6c98975f Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 14 Mar 2021 17:40:55 +0100 Subject: Don't use Substs for Ref/Raw/Array/Slice --- crates/hir_ty/src/method_resolution.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (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 c7055bee5..741440006 100644 --- a/crates/hir_ty/src/method_resolution.rs +++ b/crates/hir_ty/src/method_resolution.rs @@ -435,8 +435,7 @@ fn iterate_method_candidates_with_autoref( } let refed = Canonical { kinds: deref_chain[0].kinds.clone(), - value: TyKind::Ref(Mutability::Not, Substs::single(deref_chain[0].value.clone())) - .intern(&Interner), + value: TyKind::Ref(Mutability::Not, deref_chain[0].value.clone()).intern(&Interner), }; if iterate_method_candidates_by_receiver( &refed, @@ -452,8 +451,7 @@ fn iterate_method_candidates_with_autoref( } let ref_muted = Canonical { kinds: deref_chain[0].kinds.clone(), - value: TyKind::Ref(Mutability::Mut, Substs::single(deref_chain[0].value.clone())) - .intern(&Interner), + value: TyKind::Ref(Mutability::Mut, deref_chain[0].value.clone()).intern(&Interner), }; if iterate_method_candidates_by_receiver( &ref_muted, -- cgit v1.2.3