From 3dd1c6bc98c6c26f797527437b7f6195375bfcc6 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Fri, 25 Aug 2023 09:42:57 -0300 Subject: [PATCH] Add missing high-level stable_mir::generics_of fn --- compiler/rustc_smir/src/stable_mir/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/rustc_smir/src/stable_mir/mod.rs b/compiler/rustc_smir/src/stable_mir/mod.rs index 360f2195c1c30..44938eaa03538 100644 --- a/compiler/rustc_smir/src/stable_mir/mod.rs +++ b/compiler/rustc_smir/src/stable_mir/mod.rs @@ -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)) }