diff options
author | Florian Diebold <[email protected]> | 2019-03-21 21:29:12 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-03-21 21:29:12 +0000 |
commit | cbb418ebb87309a798ca16408c1dfb09cd638a9b (patch) | |
tree | 8298b4c130452808efad219ebae169d3eec90a81 /crates/ra_hir/src/ty/op.rs | |
parent | 97be0e6c46196552607aa0121b32a41a3515873d (diff) |
Rename name field to ctor as well
Diffstat (limited to 'crates/ra_hir/src/ty/op.rs')
-rw-r--r-- | crates/ra_hir/src/ty/op.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/ty/op.rs b/crates/ra_hir/src/ty/op.rs index 1d230140b..235661a5d 100644 --- a/crates/ra_hir/src/ty/op.rs +++ b/crates/ra_hir/src/ty/op.rs | |||
@@ -32,7 +32,7 @@ pub(super) fn binary_op_return_ty(op: BinaryOp, rhs_ty: Ty) -> Ty { | |||
32 | | BinaryOp::BitwiseAnd | 32 | | BinaryOp::BitwiseAnd |
33 | | BinaryOp::BitwiseOr | 33 | | BinaryOp::BitwiseOr |
34 | | BinaryOp::BitwiseXor => match rhs_ty { | 34 | | BinaryOp::BitwiseXor => match rhs_ty { |
35 | Ty::Apply(ApplicationTy { name, .. }) => match name { | 35 | Ty::Apply(ApplicationTy { ctor, .. }) => match ctor { |
36 | TypeCtor::Int(..) | TypeCtor::Float(..) => rhs_ty, | 36 | TypeCtor::Int(..) | TypeCtor::Float(..) => rhs_ty, |
37 | _ => Ty::Unknown, | 37 | _ => Ty::Unknown, |
38 | }, | 38 | }, |
@@ -47,7 +47,7 @@ pub(super) fn binary_op_rhs_expectation(op: BinaryOp, lhs_ty: Ty) -> Ty { | |||
47 | match op { | 47 | match op { |
48 | BinaryOp::BooleanAnd | BinaryOp::BooleanOr => Ty::simple(TypeCtor::Bool), | 48 | BinaryOp::BooleanAnd | BinaryOp::BooleanOr => Ty::simple(TypeCtor::Bool), |
49 | BinaryOp::Assignment | BinaryOp::EqualityTest => match lhs_ty { | 49 | BinaryOp::Assignment | BinaryOp::EqualityTest => match lhs_ty { |
50 | Ty::Apply(ApplicationTy { name, .. }) => match name { | 50 | Ty::Apply(ApplicationTy { ctor, .. }) => match ctor { |
51 | TypeCtor::Int(..) | 51 | TypeCtor::Int(..) |
52 | | TypeCtor::Float(..) | 52 | | TypeCtor::Float(..) |
53 | | TypeCtor::Str | 53 | | TypeCtor::Str |
@@ -82,7 +82,7 @@ pub(super) fn binary_op_rhs_expectation(op: BinaryOp, lhs_ty: Ty) -> Ty { | |||
82 | | BinaryOp::BitwiseAnd | 82 | | BinaryOp::BitwiseAnd |
83 | | BinaryOp::BitwiseOr | 83 | | BinaryOp::BitwiseOr |
84 | | BinaryOp::BitwiseXor => match lhs_ty { | 84 | | BinaryOp::BitwiseXor => match lhs_ty { |
85 | Ty::Apply(ApplicationTy { name, .. }) => match name { | 85 | Ty::Apply(ApplicationTy { ctor, .. }) => match ctor { |
86 | TypeCtor::Int(..) | TypeCtor::Float(..) => lhs_ty, | 86 | TypeCtor::Int(..) | TypeCtor::Float(..) => lhs_ty, |
87 | _ => Ty::Unknown, | 87 | _ => Ty::Unknown, |
88 | }, | 88 | }, |