diff options
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 40559c3de..268d2c110 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -57,21 +57,11 @@ pub fn infer(db: &impl HirDatabase, func: Function) -> Arc<InferenceResult> { | |||
57 | 57 | ||
58 | #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | 58 | #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] |
59 | enum ExprOrPatId { | 59 | enum ExprOrPatId { |
60 | Expr(ExprId), | 60 | ExprId(ExprId), |
61 | Pat(PatId), | 61 | PatId(PatId), |
62 | } | 62 | } |
63 | 63 | ||
64 | impl From<ExprId> for ExprOrPatId { | 64 | impl_froms!(ExprOrPatId: ExprId, PatId); |
65 | fn from(id: ExprId) -> Self { | ||
66 | ExprOrPatId::Expr(id) | ||
67 | } | ||
68 | } | ||
69 | |||
70 | impl From<PatId> for ExprOrPatId { | ||
71 | fn from(id: PatId) -> Self { | ||
72 | ExprOrPatId::Pat(id) | ||
73 | } | ||
74 | } | ||
75 | 65 | ||
76 | /// The result of type inference: A mapping from expressions and patterns to types. | 66 | /// The result of type inference: A mapping from expressions and patterns to types. |
77 | #[derive(Clone, PartialEq, Eq, Debug)] | 67 | #[derive(Clone, PartialEq, Eq, Debug)] |