Skip to content

Commit

Permalink
Add TraitDef::trait_decl method
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Aug 7, 2023
1 parent 0e69a8a commit 6e4d7bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compiler/rustc_smir/src/stable_mir/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>);

Expand Down

0 comments on commit 6e4d7bd

Please sign in to comment.