use single version of either in hir

This commit is contained in:
Aleksey Kladov 2019-06-11 01:06:11 +03:00
parent 75e6c03883
commit 156b7ee842
7 changed files with 73 additions and 68 deletions

View file

@ -2,7 +2,6 @@
use std::sync::Arc;
use rustc_hash::{FxHashMap, FxHashSet};
use either::Either;
use crate::{
ModuleDef, Trait, MacroDef,
@ -14,6 +13,7 @@ use crate::{
expr::{scope::{ExprScopes, ScopeId}, PatId},
impl_block::ImplBlock,
path::Path,
either::Either,
};
#[derive(Debug, Clone, Default)]
@ -137,7 +137,7 @@ impl Resolver {
) -> Option<MacroDef> {
let (item_map, module) = self.module()?;
match item_map.resolve_path_with_macro(db, module, path) {
(Either::Right(macro_def), None) => Some(macro_def),
(Either::B(macro_def), None) => Some(macro_def),
_ => None,
}
}