Rollup merge of #136590 - carolynzech:raw-ptr-kind-internal, r=compiler-errors
Implement RustcInternal for RawPtrKind Implement `RustcInternal` for `RawPtrKind`. https://github.com/rust-lang/rust/pull/135748 introduced a `Stable` implementation [here](https://github.com/rust-lang/rust/pull/135748/files#diff-60f5e8edf69e04e89ef0c7f576363a91fa141e1db969484cef00063ed39c62e4R235).
This commit is contained in:
commit
a9d4b013a2
1 changed files with 13 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ use rustc_span::Symbol;
|
|||
use stable_mir::abi::Layout;
|
||||
use stable_mir::mir::alloc::AllocId;
|
||||
use stable_mir::mir::mono::{Instance, MonoItem, StaticDef};
|
||||
use stable_mir::mir::{BinOp, Mutability, Place, ProjectionElem, Safety, UnOp};
|
||||
use stable_mir::mir::{BinOp, Mutability, Place, ProjectionElem, RawPtrKind, Safety, UnOp};
|
||||
use stable_mir::ty::{
|
||||
Abi, AdtDef, Binder, BoundRegionKind, BoundTyKind, BoundVariableKind, ClosureKind, DynKind,
|
||||
ExistentialPredicate, ExistentialProjection, ExistentialTraitRef, FloatTy, FnSig,
|
||||
|
|
@ -226,6 +226,18 @@ impl RustcInternal for Movability {
|
|||
}
|
||||
}
|
||||
|
||||
impl RustcInternal for RawPtrKind {
|
||||
type T<'tcx> = rustc_middle::mir::RawPtrKind;
|
||||
|
||||
fn internal<'tcx>(&self, _tables: &mut Tables<'_>, _tcx: TyCtxt<'tcx>) -> Self::T<'tcx> {
|
||||
match self {
|
||||
RawPtrKind::Mut => rustc_middle::mir::RawPtrKind::Mut,
|
||||
RawPtrKind::Const => rustc_middle::mir::RawPtrKind::Const,
|
||||
RawPtrKind::FakeForPtrMetadata => rustc_middle::mir::RawPtrKind::FakeForPtrMetadata,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl RustcInternal for FnSig {
|
||||
type T<'tcx> = rustc_ty::FnSig<'tcx>;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue