diff options
| author | makai410 <m4kai410@gmail.com> | 2025-04-01 17:11:53 +0800 | 
|---|---|---|
| committer | makai410 <m4kai410@gmail.com> | 2025-04-01 17:11:53 +0800 | 
| commit | f9ef4563c23d81dff49a3cc4443202358426e3bd (patch) | |
| tree | edc137c6fad3169820f886e52218406087b66b3d /compiler/rustc_smir/src/rustc_internal/mod.rs | |
| parent | eda7820be557755217e04242f195d1530524f399 (diff) | |
| download | rust-f9ef4563c23d81dff49a3cc4443202358426e3bd.tar.gz rust-f9ef4563c23d81dff49a3cc4443202358426e3bd.zip | |
Implement `associated_items` api.
Diffstat (limited to 'compiler/rustc_smir/src/rustc_internal/mod.rs')
| -rw-r--r-- | compiler/rustc_smir/src/rustc_internal/mod.rs | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/compiler/rustc_smir/src/rustc_internal/mod.rs b/compiler/rustc_smir/src/rustc_internal/mod.rs index ad38ea228bf..30e9b2e72f7 100644 --- a/compiler/rustc_smir/src/rustc_internal/mod.rs +++ b/compiler/rustc_smir/src/rustc_internal/mod.rs @@ -147,6 +147,14 @@ impl<'tcx> Tables<'tcx> { stable_mir::ty::CoroutineWitnessDef(self.create_def_id(did)) } + pub fn assoc_def(&mut self, did: DefId) -> stable_mir::ty::AssocDef { + stable_mir::ty::AssocDef(self.create_def_id(did)) + } + + pub fn opaque_def(&mut self, did: DefId) -> stable_mir::ty::OpaqueDef { + stable_mir::ty::OpaqueDef(self.create_def_id(did)) + } + pub fn prov(&mut self, aid: AllocId) -> stable_mir::ty::Prov { stable_mir::ty::Prov(self.create_alloc_id(aid)) } | 
