mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Rename GenericPredicate -> WhereClause
This commit is contained in:
parent
8b16af590d
commit
7a5fb37cf1
10 changed files with 89 additions and 105 deletions
|
@ -9,8 +9,8 @@ use hir_def::{lang_item::LangItemTarget, TraitId};
|
|||
use stdx::panic_context;
|
||||
|
||||
use crate::{
|
||||
db::HirDatabase, AliasTy, Canonical, DebruijnIndex, GenericPredicate, HirDisplay, Substitution,
|
||||
TraitRef, Ty, TyKind, TypeWalk,
|
||||
db::HirDatabase, AliasTy, Canonical, DebruijnIndex, HirDisplay, Substitution, TraitRef, Ty,
|
||||
TyKind, TypeWalk, WhereClause,
|
||||
};
|
||||
|
||||
use self::chalk::{from_chalk, Interner, ToChalk};
|
||||
|
@ -96,11 +96,11 @@ pub enum Obligation {
|
|||
}
|
||||
|
||||
impl Obligation {
|
||||
pub fn from_predicate(predicate: GenericPredicate) -> Option<Obligation> {
|
||||
pub fn from_predicate(predicate: WhereClause) -> Option<Obligation> {
|
||||
match predicate {
|
||||
GenericPredicate::Implemented(trait_ref) => Some(Obligation::Trait(trait_ref)),
|
||||
GenericPredicate::AliasEq(alias_eq) => Some(Obligation::AliasEq(alias_eq)),
|
||||
GenericPredicate::Error => None,
|
||||
WhereClause::Implemented(trait_ref) => Some(Obligation::Trait(trait_ref)),
|
||||
WhereClause::AliasEq(alias_eq) => Some(Obligation::AliasEq(alias_eq)),
|
||||
WhereClause::Error => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue