Skip to content

Commit

Permalink
Add missing high-level stable_mir::generics_of fn
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Aug 25, 2023
1 parent b60f7b5 commit 3dd1c6b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/rustc_smir/src/stable_mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ pub fn trait_impl(trait_impl: &ImplDef) -> ImplTrait {
with(|cx| cx.trait_impl(trait_impl))
}

pub fn generics_of(generic_def: &GenericDef) -> Generics {
with(|cx| cx.generics_of(generic_def))
}

pub fn predicates_of(trait_def: &TraitDef) -> GenericPredicates {
with(|cx| cx.predicates_of(trait_def))
}
Expand Down

0 comments on commit 3dd1c6b

Please sign in to comment.