diff options
author | Alan Du <[email protected]> | 2019-06-03 15:21:08 +0100 |
---|---|---|
committer | Alan Du <[email protected]> | 2019-06-04 23:05:07 +0100 |
commit | 40424d4222d4630bc53294d10f1718f2d3d300de (patch) | |
tree | 4e27c7f2ce4a886e9a512b4986509b0927ae9ea1 /crates/ra_hir/src/ty | |
parent | ed3d93b875f25da6f81b8a107a8c200311240627 (diff) |
Fix clippy::identity_conversion
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 58cfcd8a2..5edc59f18 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -539,7 +539,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
539 | } | 539 | } |
540 | })?; | 540 | })?; |
541 | 541 | ||
542 | resolved = Resolution::Def(item.into()); | 542 | resolved = Resolution::Def(item); |
543 | } | 543 | } |
544 | 544 | ||
545 | match resolved { | 545 | match resolved { |
@@ -762,7 +762,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
762 | _ => &Ty::Unknown, | 762 | _ => &Ty::Unknown, |
763 | }; | 763 | }; |
764 | let subty = self.infer_pat(*pat, expectation, default_bm); | 764 | let subty = self.infer_pat(*pat, expectation, default_bm); |
765 | Ty::apply_one(TypeCtor::Ref(*mutability), subty.into()) | 765 | Ty::apply_one(TypeCtor::Ref(*mutability), subty) |
766 | } | 766 | } |
767 | Pat::TupleStruct { path: ref p, args: ref subpats } => { | 767 | Pat::TupleStruct { path: ref p, args: ref subpats } => { |
768 | self.infer_tuple_struct_pat(p.as_ref(), subpats, expected, default_bm) | 768 | self.infer_tuple_struct_pat(p.as_ref(), subpats, expected, default_bm) |
@@ -790,7 +790,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
790 | 790 | ||
791 | let bound_ty = match mode { | 791 | let bound_ty = match mode { |
792 | BindingMode::Ref(mutability) => { | 792 | BindingMode::Ref(mutability) => { |
793 | Ty::apply_one(TypeCtor::Ref(mutability), inner_ty.clone().into()) | 793 | Ty::apply_one(TypeCtor::Ref(mutability), inner_ty.clone()) |
794 | } | 794 | } |
795 | BindingMode::Move => inner_ty.clone(), | 795 | BindingMode::Move => inner_ty.clone(), |
796 | }; | 796 | }; |