diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-06 09:52:02 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-06 09:52:02 +0100 |
commit | 047b5313013383fc4fafaef6d6d8d6a64549e3cb (patch) | |
tree | f4951c835dd6f4840ae02ba5c06d5da44aedae94 /crates/hir_ty/src/method_resolution.rs | |
parent | 4bc8a018302d53951ae855ba57d07095a16ef182 (diff) | |
parent | 08dc69599efb4961319c0118b789d3abb264b7fa (diff) |
Merge #8359
8359: Add Lifetime to TyKind::Ref and DynTy r=flodiebold a=Veykril
CC #8313
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/method_resolution.rs')
-rw-r--r-- | crates/hir_ty/src/method_resolution.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/hir_ty/src/method_resolution.rs b/crates/hir_ty/src/method_resolution.rs index 6d65d3eb9..436dea22b 100644 --- a/crates/hir_ty/src/method_resolution.rs +++ b/crates/hir_ty/src/method_resolution.rs | |||
@@ -19,6 +19,7 @@ use crate::{ | |||
19 | db::HirDatabase, | 19 | db::HirDatabase, |
20 | from_foreign_def_id, | 20 | from_foreign_def_id, |
21 | primitive::{self, FloatTy, IntTy, UintTy}, | 21 | primitive::{self, FloatTy, IntTy, UintTy}, |
22 | static_lifetime, | ||
22 | utils::all_super_traits, | 23 | utils::all_super_traits, |
23 | AdtId, Canonical, CanonicalVarKinds, DebruijnIndex, FnPointer, FnSig, ForeignDefId, | 24 | AdtId, Canonical, CanonicalVarKinds, DebruijnIndex, FnPointer, FnSig, ForeignDefId, |
24 | InEnvironment, Interner, Scalar, Substitution, TraitEnvironment, Ty, TyBuilder, TyKind, | 25 | InEnvironment, Interner, Scalar, Substitution, TraitEnvironment, Ty, TyBuilder, TyKind, |
@@ -453,7 +454,8 @@ fn iterate_method_candidates_with_autoref( | |||
453 | } | 454 | } |
454 | let refed = Canonical { | 455 | let refed = Canonical { |
455 | binders: deref_chain[0].binders.clone(), | 456 | binders: deref_chain[0].binders.clone(), |
456 | value: TyKind::Ref(Mutability::Not, deref_chain[0].value.clone()).intern(&Interner), | 457 | value: TyKind::Ref(Mutability::Not, static_lifetime(), deref_chain[0].value.clone()) |
458 | .intern(&Interner), | ||
457 | }; | 459 | }; |
458 | if iterate_method_candidates_by_receiver( | 460 | if iterate_method_candidates_by_receiver( |
459 | &refed, | 461 | &refed, |
@@ -470,7 +472,8 @@ fn iterate_method_candidates_with_autoref( | |||
470 | } | 472 | } |
471 | let ref_muted = Canonical { | 473 | let ref_muted = Canonical { |
472 | binders: deref_chain[0].binders.clone(), | 474 | binders: deref_chain[0].binders.clone(), |
473 | value: TyKind::Ref(Mutability::Mut, deref_chain[0].value.clone()).intern(&Interner), | 475 | value: TyKind::Ref(Mutability::Mut, static_lifetime(), deref_chain[0].value.clone()) |
476 | .intern(&Interner), | ||
474 | }; | 477 | }; |
475 | if iterate_method_candidates_by_receiver( | 478 | if iterate_method_candidates_by_receiver( |
476 | &ref_muted, | 479 | &ref_muted, |