DefIds are not only about CrateItem
This commit is contained in:
parent
e571544f44
commit
5cf570f325
@ -147,13 +147,6 @@ pub(crate) trait Stable {
|
|||||||
fn stable(&self) -> Self::T;
|
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> {
|
impl<'tcx> Stable for mir::Statement<'tcx> {
|
||||||
type T = stable_mir::mir::Statement;
|
type T = stable_mir::mir::Statement;
|
||||||
fn stable(&self) -> Self::T {
|
fn stable(&self) -> Self::T {
|
||||||
@ -188,7 +181,9 @@ impl<'tcx> Stable for mir::Rvalue<'tcx> {
|
|||||||
Ref(region, kind, place) => {
|
Ref(region, kind, place) => {
|
||||||
stable_mir::mir::Rvalue::Ref(opaque(region), kind.stable(), place.stable())
|
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) => {
|
AddressOf(mutability, place) => {
|
||||||
stable_mir::mir::Rvalue::AddressOf(mutability.stable(), place.stable())
|
stable_mir::mir::Rvalue::AddressOf(mutability.stable(), place.stable())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user