aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/expr
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/expr')
-rw-r--r--crates/ra_hir/src/expr/validation.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/crates/ra_hir/src/expr/validation.rs b/crates/ra_hir/src/expr/validation.rs
index 030ec53a2..f06e5ec07 100644
--- a/crates/ra_hir/src/expr/validation.rs
+++ b/crates/ra_hir/src/expr/validation.rs
@@ -7,8 +7,7 @@ use crate::{
7 db::HirDatabase, 7 db::HirDatabase,
8 diagnostics::{DiagnosticSink, MissingFields, MissingOkInTailExpr}, 8 diagnostics::{DiagnosticSink, MissingFields, MissingOkInTailExpr},
9 expr::AstPtr, 9 expr::AstPtr,
10 name, 10 path::known,
11 path::{PathKind, PathSegment},
12 ty::{ApplicationTy, InferenceResult, Ty, TypeCtor}, 11 ty::{ApplicationTy, InferenceResult, Ty, TypeCtor},
13 Adt, Function, Name, Path, 12 Adt, Function, Name, Path,
14}; 13};
@@ -108,14 +107,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
108 None => return, 107 None => return,
109 }; 108 };
110 109
111 let std_result_path = Path { 110 let std_result_path = known::std_result_result();
112 kind: PathKind::Abs,
113 segments: vec![
114 PathSegment { name: name::STD, args_and_bindings: None },
115 PathSegment { name: name::RESULT_MOD, args_and_bindings: None },
116 PathSegment { name: name::RESULT_TYPE, args_and_bindings: None },
117 ],
118 };
119 111
120 let resolver = self.func.resolver(db); 112 let resolver = self.func.resolver(db);
121 let std_result_enum = match resolver.resolve_known_enum(db, &std_result_path) { 113 let std_result_enum = match resolver.resolve_known_enum(db, &std_result_path) {