aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/expr/validation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/expr/validation.rs')
-rw-r--r--crates/ra_hir/src/expr/validation.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/expr/validation.rs b/crates/ra_hir/src/expr/validation.rs
index 447b9264a..030ec53a2 100644
--- a/crates/ra_hir/src/expr/validation.rs
+++ b/crates/ra_hir/src/expr/validation.rs
@@ -10,7 +10,7 @@ use crate::{
10 name, 10 name,
11 path::{PathKind, PathSegment}, 11 path::{PathKind, PathSegment},
12 ty::{ApplicationTy, InferenceResult, Ty, TypeCtor}, 12 ty::{ApplicationTy, InferenceResult, Ty, TypeCtor},
13 AdtDef, Function, Name, Path, 13 Adt, Function, Name, Path,
14}; 14};
15 15
16use super::{Expr, ExprId, RecordLitField}; 16use super::{Expr, ExprId, RecordLitField};
@@ -58,7 +58,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
58 } 58 }
59 59
60 let struct_def = match self.infer[id].as_adt() { 60 let struct_def = match self.infer[id].as_adt() {
61 Some((AdtDef::Struct(s), _)) => s, 61 Some((Adt::Struct(s), _)) => s,
62 _ => return, 62 _ => return,
63 }; 63 };
64 64
@@ -123,7 +123,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
123 _ => return, 123 _ => return,
124 }; 124 };
125 125
126 let std_result_ctor = TypeCtor::Adt(AdtDef::Enum(std_result_enum)); 126 let std_result_ctor = TypeCtor::Adt(Adt::Enum(std_result_enum));
127 let params = match &mismatch.expected { 127 let params = match &mismatch.expected {
128 Ty::Apply(ApplicationTy { ctor, parameters }) if ctor == &std_result_ctor => parameters, 128 Ty::Apply(ApplicationTy { ctor, parameters }) if ctor == &std_result_ctor => parameters,
129 _ => return, 129 _ => return,