Skip to content

Commit c503527

Browse files
committed
Auto merge of #115211 - spastorino:add-missing-smir-generics-of, r=compiler-errors
Add missing high-level stable_mir::generics_of fn We forgot to add this function in #115092, as we have done on #115084 and other high level APIs. At some point I think we should re-organize the structure of the code but this is what we have for now. r? `@compiler-errors` Would have assigned `@oli-obk` but he is still on vacations
2 parents ac89e16 + 3dd1c6b commit c503527

File tree

1 file changed

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

1 file changed

+4
-0
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ pub fn trait_impl(trait_impl: &ImplDef) -> ImplTrait {
109109
with(|cx| cx.trait_impl(trait_impl))
110110
}
111111

112+
pub fn generics_of(generic_def: &GenericDef) -> Generics {
113+
with(|cx| cx.generics_of(generic_def))
114+
}
115+
112116
pub fn predicates_of(trait_def: &TraitDef) -> GenericPredicates {
113117
with(|cx| cx.predicates_of(trait_def))
114118
}

0 commit comments

Comments
 (0)