mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
use single version of either in hir
This commit is contained in:
parent
75e6c03883
commit
156b7ee842
7 changed files with 73 additions and 68 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue