mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
minor: import Either
from either
This commit is contained in:
parent
f5401f6206
commit
cf0c8fe000
10 changed files with 13 additions and 9 deletions
|
@ -5,11 +5,11 @@
|
|||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
|
||||
use either::Either;
|
||||
use hir_def::lang_item::LangItem;
|
||||
use hir_def::{resolver::HasResolver, AdtId, AssocItemId, DefWithBodyId, HasModule};
|
||||
use hir_def::{ItemContainerId, Lookup};
|
||||
use hir_expand::name;
|
||||
use itertools::Either;
|
||||
use itertools::Itertools;
|
||||
use rustc_hash::FxHashSet;
|
||||
use typed_arena::Arena;
|
||||
|
|
|
@ -17,6 +17,7 @@ use std::ops::Index;
|
|||
use std::sync::Arc;
|
||||
|
||||
use chalk_ir::{cast::Cast, ConstValue, DebruijnIndex, Mutability, Safety, Scalar, TypeFlags};
|
||||
use either::Either;
|
||||
use hir_def::{
|
||||
body::Body,
|
||||
builtin_type::{BuiltinInt, BuiltinType, BuiltinUint},
|
||||
|
@ -31,7 +32,6 @@ use hir_def::{
|
|||
ItemContainerId, Lookup, TraitId, TypeAliasId, VariantId,
|
||||
};
|
||||
use hir_expand::name::name;
|
||||
use itertools::Either;
|
||||
use la_arena::ArenaMap;
|
||||
use rustc_hash::FxHashMap;
|
||||
use stdx::always;
|
||||
|
|
|
@ -42,9 +42,9 @@ use chalk_ir::{
|
|||
visit::{TypeSuperVisitable, TypeVisitable, TypeVisitor},
|
||||
NoSolution, TyData,
|
||||
};
|
||||
use either::Either;
|
||||
use hir_def::{expr::ExprId, type_ref::Rawness, TypeOrConstParamId};
|
||||
use hir_expand::name;
|
||||
use itertools::Either;
|
||||
use la_arena::{Arena, Idx};
|
||||
use rustc_hash::FxHashSet;
|
||||
use traits::FnTrait;
|
||||
|
|
|
@ -16,6 +16,7 @@ use chalk_ir::{
|
|||
cast::Cast, fold::Shift, fold::TypeFoldable, interner::HasInterner, Mutability, Safety,
|
||||
};
|
||||
|
||||
use either::Either;
|
||||
use hir_def::{
|
||||
adt::StructKind,
|
||||
body::{Expander, LowerCtx},
|
||||
|
@ -35,7 +36,6 @@ use hir_def::{
|
|||
};
|
||||
use hir_expand::{name::Name, ExpandResult};
|
||||
use intern::Interned;
|
||||
use itertools::Either;
|
||||
use la_arena::{Arena, ArenaMap};
|
||||
use rustc_hash::FxHashSet;
|
||||
use smallvec::SmallVec;
|
||||
|
@ -1583,10 +1583,10 @@ pub(crate) fn generic_defaults_recover(
|
|||
.iter_id()
|
||||
.map(|id| {
|
||||
let val = match id {
|
||||
itertools::Either::Left(_) => {
|
||||
Either::Left(_) => {
|
||||
GenericArgData::Ty(TyKind::Error.intern(Interner)).intern(Interner)
|
||||
}
|
||||
itertools::Either::Right(id) => unknown_const_as_generic(db.const_param_ty(id)),
|
||||
Either::Right(id) => unknown_const_as_generic(db.const_param_ty(id)),
|
||||
};
|
||||
crate::make_binders(db, &generic_params, val)
|
||||
})
|
||||
|
|
|
@ -5,6 +5,7 @@ use std::iter;
|
|||
|
||||
use base_db::CrateId;
|
||||
use chalk_ir::{cast::Cast, fold::Shift, BoundVar, DebruijnIndex};
|
||||
use either::Either;
|
||||
use hir_def::{
|
||||
db::DefDatabase,
|
||||
generics::{
|
||||
|
@ -19,7 +20,6 @@ use hir_def::{
|
|||
};
|
||||
use hir_expand::name::Name;
|
||||
use intern::Interned;
|
||||
use itertools::Either;
|
||||
use rustc_hash::FxHashSet;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue