Skip to content

Commit 6e4d7bd

Browse files
committed
Add TraitDef::trait_decl method
1 parent 0e69a8a commit 6e4d7bd

File tree

1 file changed

+6
-0
lines changed
  • compiler/rustc_smir/src/stable_mir

1 file changed

+6
-0
lines changed

Diff for: compiler/rustc_smir/src/stable_mir/ty.rs

+6
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ pub struct AliasDef(pub(crate) DefId);
105105
#[derive(Clone, PartialEq, Eq, Debug)]
106106
pub struct TraitDef(pub(crate) DefId);
107107

108+
impl TraitDef {
109+
pub fn trait_decl(&self) -> TraitDecl {
110+
with(|cx| cx.trait_decl(self))
111+
}
112+
}
113+
108114
#[derive(Clone, Debug)]
109115
pub struct GenericArgs(pub Vec<GenericArgKind>);
110116

0 commit comments

Comments
 (0)