Add TraitDef::trait_decl method

This commit is contained in:
Santiago Pastorino 2023-08-05 22:08:30 -03:00
parent 0e69a8ad20
commit 6e4d7bd90e
No known key found for this signature in database
GPG Key ID: 8131A24E0C79EFAF

View File

@ -105,6 +105,12 @@ pub struct AliasDef(pub(crate) DefId);
#[derive(Clone, PartialEq, Eq, Debug)]
pub struct TraitDef(pub(crate) DefId);
impl TraitDef {
pub fn trait_decl(&self) -> TraitDecl {
with(|cx| cx.trait_decl(self))
}
}
#[derive(Clone, Debug)]
pub struct GenericArgs(pub Vec<GenericArgKind>);