Implement generics_of and predicates_of only for TraitDecl for now
This commit is contained in:
parent
0c301e9d36
commit
079e3732cc
1 changed files with 10 additions and 6 deletions
|
@ -135,12 +135,6 @@ impl ImplDef {
|
|||
}
|
||||
}
|
||||
|
||||
impl GenericDef {
|
||||
pub fn generics_of(&self) -> Generics {
|
||||
with(|cx| cx.generics_of(self.0))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct GenericArgs(pub Vec<GenericArgKind>);
|
||||
|
||||
|
@ -463,6 +457,16 @@ pub struct TraitDecl {
|
|||
pub deny_explicit_impl: bool,
|
||||
}
|
||||
|
||||
impl TraitDecl {
|
||||
pub fn generics_of(&self) -> Generics {
|
||||
with(|cx| cx.generics_of(self.def_id.0))
|
||||
}
|
||||
|
||||
pub fn predicates_of(&self) -> GenericPredicates {
|
||||
with(|cx| cx.predicates_of(self.def_id.0))
|
||||
}
|
||||
}
|
||||
|
||||
pub type ImplTrait = EarlyBinder<TraitRef>;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
|
|
Loading…
Add table
Reference in a new issue