]> git.lizzy.rs Git - rust.git/blobdiff - crates/ra_hir/src/source_binder.rs
Replace `ra_hir_expand::either` with crate
[rust.git] / crates / ra_hir / src / source_binder.rs
index 0df7a7cb49750f5a50eeb0effc066b6197340921..28d41b647489b9d15ec9fa5b37781a9d08cb840c 100644 (file)
@@ -7,6 +7,7 @@
 //! purely for "IDE needs".
 use std::sync::Arc;
 
+use either::Either;
 use hir_def::{
     body::{
         scope::{ExprScopes, ScopeId},
@@ -33,8 +34,8 @@
         method_resolution::{self, implements_trait},
         InEnvironment, TraitEnvironment, Ty,
     },
-    Adt, AssocItem, Const, DefWithBody, Either, Enum, EnumVariant, FromSource, Function,
-    GenericParam, Local, MacroDef, Name, Path, ScopeDef, Static, Struct, Trait, Type, TypeAlias,
+    Adt, AssocItem, Const, DefWithBody, Enum, EnumVariant, FromSource, Function, GenericParam,
+    Local, MacroDef, Name, Path, ScopeDef, Static, Struct, Trait, Type, TypeAlias,
 };
 
 fn try_get_resolver_for_node(db: &impl HirDatabase, node: InFile<&SyntaxNode>) -> Option<Resolver> {
@@ -349,7 +350,7 @@ pub fn process_all_names(&self, db: &impl HirDatabase, f: &mut dyn FnMut(Name, S
     // should switch to general reference search infra there.
     pub fn find_all_refs(&self, pat: &ast::BindPat) -> Vec<ReferenceDescriptor> {
         let fn_def = pat.syntax().ancestors().find_map(ast::FnDef::cast).unwrap();
-        let ptr = Either::A(AstPtr::new(&ast::Pat::from(pat.clone())));
+        let ptr = Either::Left(AstPtr::new(&ast::Pat::from(pat.clone())));
         fn_def
             .syntax()
             .descendants()