Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer.rs')
| -rw-r--r-- | crates/hir-ty/src/infer.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/hir-ty/src/infer.rs b/crates/hir-ty/src/infer.rs index c7c8deaaee..0a64b929a1 100644 --- a/crates/hir-ty/src/infer.rs +++ b/crates/hir-ty/src/infer.rs @@ -130,7 +130,7 @@ trait PatLike: Into<ExprOrPatId> + Copy { type BindingMode: Copy; fn infer( - this: &mut InferenceContext, + this: &mut InferenceContext<'_>, id: Self, expected_ty: &Ty, default_bm: Self::BindingMode, @@ -140,7 +140,7 @@ trait PatLike: Into<ExprOrPatId> + Copy { impl PatLike for ExprId { type BindingMode = (); - fn infer(this: &mut InferenceContext, id: Self, expected_ty: &Ty, _: Self::BindingMode) -> Ty { + fn infer(this: &mut InferenceContext<'_>, id: Self, expected_ty: &Ty, _: Self::BindingMode) -> Ty { this.infer_assignee_expr(id, expected_ty) } } @@ -149,7 +149,7 @@ impl PatLike for PatId { type BindingMode = BindingMode; fn infer( - this: &mut InferenceContext, + this: &mut InferenceContext<'_>, id: Self, expected_ty: &Ty, default_bm: Self::BindingMode, @@ -971,7 +971,7 @@ impl Expectation { /// which still is useful, because it informs integer literals and the like. /// See the test case `test/ui/coerce-expect-unsized.rs` and #20169 /// for examples of where this comes up,. - fn rvalue_hint(table: &mut unify::InferenceTable, ty: Ty) -> Self { + fn rvalue_hint(table: &mut unify::InferenceTable<'_>, ty: Ty) -> Self { // FIXME: do struct_tail_without_normalization match table.resolve_ty_shallow(&ty).kind(Interner) { TyKind::Slice(_) | TyKind::Str | TyKind::Dyn(_) => Expectation::RValueLikeUnsized(ty), @@ -984,7 +984,7 @@ impl Expectation { Expectation::None } - fn resolve(&self, table: &mut unify::InferenceTable) -> Expectation { + fn resolve(&self, table: &mut unify::InferenceTable<'_>) -> Expectation { match self { Expectation::None => Expectation::None, Expectation::HasType(t) => Expectation::HasType(table.resolve_ty_shallow(t)), @@ -994,7 +994,7 @@ impl Expectation { } } - fn to_option(&self, table: &mut unify::InferenceTable) -> Option<Ty> { + fn to_option(&self, table: &mut unify::InferenceTable<'_>) -> Option<Ty> { match self.resolve(table) { Expectation::None => None, Expectation::HasType(t) | @@ -1003,7 +1003,7 @@ impl Expectation { } } - fn only_has_type(&self, table: &mut unify::InferenceTable) -> Option<Ty> { + fn only_has_type(&self, table: &mut unify::InferenceTable<'_>) -> Option<Ty> { match self { Expectation::HasType(t) => Some(table.resolve_ty_shallow(t)), // Expectation::Castable(_) | @@ -1028,7 +1028,7 @@ impl Expectation { /// an expected type. Otherwise, we might write parts of the type /// when checking the 'then' block which are incompatible with the /// 'else' branch. - fn adjust_for_branches(&self, table: &mut unify::InferenceTable) -> Expectation { + fn adjust_for_branches(&self, table: &mut unify::InferenceTable<'_>) -> Expectation { match self { Expectation::HasType(ety) => { let ety = table.resolve_ty_shallow(ety); |