diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2023-07-11 17:16:44 -0300 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2023-07-12 16:26:05 -0300 |
| commit | 5cf570f3256f69bf1dfe7f999c2802753dda84d5 (patch) | |
| tree | 7b7aca1a9a01bf3543cc60d929dfbf42df699fad | |
| parent | e571544f4448d35af55e5ea3f35b92a2e784944a (diff) | |
| download | rust-5cf570f3256f69bf1dfe7f999c2802753dda84d5.tar.gz rust-5cf570f3256f69bf1dfe7f999c2802753dda84d5.zip | |
DefIds are not only about CrateItem
| -rw-r--r-- | compiler/rustc_smir/src/rustc_smir/mod.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/compiler/rustc_smir/src/rustc_smir/mod.rs b/compiler/rustc_smir/src/rustc_smir/mod.rs index f22c620021e..cd40ddab3fe 100644 --- a/compiler/rustc_smir/src/rustc_smir/mod.rs +++ b/compiler/rustc_smir/src/rustc_smir/mod.rs @@ -147,13 +147,6 @@ pub(crate) trait Stable { fn stable(&self) -> Self::T; } -impl Stable for DefId { - type T = stable_mir::CrateItem; - fn stable(&self) -> Self::T { - rustc_internal::crate_item(*self) - } -} - impl<'tcx> Stable for mir::Statement<'tcx> { type T = stable_mir::mir::Statement; fn stable(&self) -> Self::T { @@ -188,7 +181,9 @@ impl<'tcx> Stable for mir::Rvalue<'tcx> { Ref(region, kind, place) => { stable_mir::mir::Rvalue::Ref(opaque(region), kind.stable(), place.stable()) } - ThreadLocalRef(def_id) => stable_mir::mir::Rvalue::ThreadLocalRef(def_id.stable()), + ThreadLocalRef(def_id) => { + stable_mir::mir::Rvalue::ThreadLocalRef(rustc_internal::crate_item(*def_id)) + } AddressOf(mutability, place) => { stable_mir::mir::Rvalue::AddressOf(mutability.stable(), place.stable()) } |
