mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Define known paths and group names
This commit is contained in:
parent
de9670fe45
commit
7ed3be3291
6 changed files with 63 additions and 49 deletions
|
@ -7,8 +7,7 @@ use crate::{
|
|||
db::HirDatabase,
|
||||
diagnostics::{DiagnosticSink, MissingFields, MissingOkInTailExpr},
|
||||
expr::AstPtr,
|
||||
name,
|
||||
path::PathKind,
|
||||
path::known,
|
||||
ty::{ApplicationTy, InferenceResult, Ty, TypeCtor},
|
||||
Adt, Function, Name, Path,
|
||||
};
|
||||
|
@ -108,10 +107,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
|
|||
None => return,
|
||||
};
|
||||
|
||||
let std_result_path = Path::from_simple_segments(
|
||||
PathKind::Abs,
|
||||
vec![name::STD, name::RESULT_MOD, name::RESULT_TYPE],
|
||||
);
|
||||
let std_result_path = known::std_result_result();
|
||||
|
||||
let resolver = self.func.resolver(db);
|
||||
let std_result_enum = match resolver.resolve_known_enum(db, &std_result_path) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue