Implement RustcInternal for RawPtrKind
This commit is contained in:
parent
820bfffc25
commit
3b54faba15
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