diff options
| author | David Wood <david.wood@huawei.com> | 2021-10-01 17:08:06 +0000 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2021-10-01 17:08:06 +0000 |
| commit | 76b05531cab9bc24a54791b46b5bb9a7c3dcdd7c (patch) | |
| tree | 0ade4d9fac829bbf1b14af0437540c3546c11de1 /compiler/rustc_metadata/src/rmeta/decoder | |
| parent | 4528b8e581eb1bb24f4f264d43244d7912f812f7 (diff) | |
polymorphize: polymorphize shims
This commit removes the restriction of `InstanceDef::Item` on polymorphization, so that shims can now be polymorphized. Signed-off-by: David Wood <david.wood@huawei.com>
Diffstat (limited to 'compiler/rustc_metadata/src/rmeta/decoder')
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs index bd1d99640f8..79f1beb0799 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs @@ -84,6 +84,12 @@ impl IntoArgs for (CrateNum, DefId) { } } +impl IntoArgs for ty::InstanceDef<'tcx> { + fn into_args(self) -> (DefId, DefId) { + (self.def_id(), self.def_id()) + } +} + provide! { <'tcx> tcx, def_id, other, cdata, type_of => { cdata.get_type(def_id.index, tcx) } generics_of => { cdata.get_generics(def_id.index, tcx.sess) } |
