mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-03 17:35:28 +03:00
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:
@@ -10,7 +10,7 @@
|
||||
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 @@ fn internal<'tcx>(&self, _tables: &mut Tables<'_>, _tcx: TyCtxt<'tcx>) -> Self::
|
||||
}
|
||||
}
|
||||
|
||||
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>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user