aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/method_resolution.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-15 12:51:27 +0000
committerGitHub <[email protected]>2021-03-15 12:51:27 +0000
commit6139bd764974318814edfd5427e2a2e8220b211b (patch)
tree70aa9b1a1b338f0c02545cb544ab37c4547f7ce2 /crates/hir_ty/src/method_resolution.rs
parenta8b319cf28c0985d964ef6624c3ee6e7f09afb2d (diff)
parent42217738e0b121a8e5d48a9a55cb51ef6c98975f (diff)
Merge #8018
8018: Make Ty wrap TyKind in an Arc r=flodiebold a=flodiebold ... to further move towards Chalk. This is a bit of a slowdown (218ginstr vs 213ginstr for inference on RA), even though it allows us to unwrap the Substs in `TyKind::Ref` etc.. Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/method_resolution.rs')
-rw-r--r--crates/hir_ty/src/method_resolution.rs6
1 files changed, 2 insertions, 4 deletions
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(
435 } 435 }
436 let refed = Canonical { 436 let refed = Canonical {
437 kinds: deref_chain[0].kinds.clone(), 437 kinds: deref_chain[0].kinds.clone(),
438 value: TyKind::Ref(Mutability::Not, Substs::single(deref_chain[0].value.clone())) 438 value: TyKind::Ref(Mutability::Not, deref_chain[0].value.clone()).intern(&Interner),
439 .intern(&Interner),
440 }; 439 };
441 if iterate_method_candidates_by_receiver( 440 if iterate_method_candidates_by_receiver(
442 &refed, 441 &refed,
@@ -452,8 +451,7 @@ fn iterate_method_candidates_with_autoref(
452 } 451 }
453 let ref_muted = Canonical { 452 let ref_muted = Canonical {
454 kinds: deref_chain[0].kinds.clone(), 453 kinds: deref_chain[0].kinds.clone(),
455 value: TyKind::Ref(Mutability::Mut, Substs::single(deref_chain[0].value.clone())) 454 value: TyKind::Ref(Mutability::Mut, deref_chain[0].value.clone()).intern(&Interner),
456 .intern(&Interner),
457 }; 455 };
458 if iterate_method_candidates_by_receiver( 456 if iterate_method_candidates_by_receiver(
459 &ref_muted, 457 &ref_muted,