File tree Expand file tree Collapse file tree 3 files changed +399
-192
lines changed Expand file tree Collapse file tree 3 files changed +399
-192
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,14 @@ pub fn generator_def(did: DefId) -> stable_mir::ty::GeneratorDef {
4747 with_tables ( |t| t. generator_def ( did) )
4848}
4949
50+ pub fn param_def ( did : DefId ) -> stable_mir:: ty:: ParamDef {
51+ with_tables ( |t| t. param_def ( did) )
52+ }
53+
54+ pub fn br_named_def ( did : DefId ) -> stable_mir:: ty:: BrNamedDef {
55+ with_tables ( |t| t. br_named_def ( did) )
56+ }
57+
5058impl < ' tcx > Tables < ' tcx > {
5159 pub fn item_def_id ( & self , item : & stable_mir:: CrateItem ) -> DefId {
5260 self . def_ids [ item. 0 ]
@@ -76,6 +84,14 @@ impl<'tcx> Tables<'tcx> {
7684 stable_mir:: ty:: GeneratorDef ( self . create_def_id ( did) )
7785 }
7886
87+ pub fn param_def ( & mut self , did : DefId ) -> stable_mir:: ty:: ParamDef {
88+ stable_mir:: ty:: ParamDef ( self . create_def_id ( did) )
89+ }
90+
91+ pub fn br_named_def ( & mut self , did : DefId ) -> stable_mir:: ty:: BrNamedDef {
92+ stable_mir:: ty:: BrNamedDef ( self . create_def_id ( did) )
93+ }
94+
7995 fn create_def_id ( & mut self , did : DefId ) -> stable_mir:: DefId {
8096 // FIXME: this becomes inefficient when we have too many ids
8197 for ( i, & d) in self . def_ids . iter ( ) . enumerate ( ) {
You can’t perform that action at this time.
0 commit comments