File tree Expand file tree Collapse file tree 2 files changed +4
-13
lines changed Expand file tree Collapse file tree 2 files changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -826,7 +826,7 @@ impl<'tcx> Stable<'tcx> for ty::FnSig<'tcx> {
826826 type T = stable_mir:: ty:: FnSig ;
827827 fn stable ( & self , tables : & mut Tables < ' tcx > ) -> Self :: T {
828828 use rustc_target:: spec:: abi;
829- use stable_mir:: ty:: { Abi , FnSig , Unsafety } ;
829+ use stable_mir:: ty:: { Abi , FnSig } ;
830830
831831 FnSig {
832832 inputs_and_output : self
@@ -835,10 +835,7 @@ impl<'tcx> Stable<'tcx> for ty::FnSig<'tcx> {
835835 . map ( |ty| tables. intern_ty ( ty) )
836836 . collect ( ) ,
837837 c_variadic : self . c_variadic ,
838- unsafety : match self . unsafety {
839- hir:: Unsafety :: Normal => Unsafety :: Normal ,
840- hir:: Unsafety :: Unsafe => Unsafety :: Unsafe ,
841- } ,
838+ unsafety : self . unsafety . stable ( tables) ,
842839 abi : match self . abi {
843840 abi:: Abi :: Rust => Abi :: Rust ,
844841 abi:: Abi :: C { unwind } => Abi :: C { unwind } ,
Original file line number Diff line number Diff line change 1- use super :: { mir:: Mutability , with, DefId } ;
1+ use super :: { mir:: Mutability , mir :: Safety , with, DefId } ;
22use crate :: rustc_internal:: Opaque ;
33
44#[ derive( Copy , Clone , Debug ) ]
@@ -140,16 +140,10 @@ pub type PolyFnSig = Binder<FnSig>;
140140pub struct FnSig {
141141 pub inputs_and_output : Vec < Ty > ,
142142 pub c_variadic : bool ,
143- pub unsafety : Unsafety ,
143+ pub unsafety : Safety ,
144144 pub abi : Abi ,
145145}
146146
147- #[ derive( Clone , PartialEq , Eq , Debug ) ]
148- pub enum Unsafety {
149- Unsafe ,
150- Normal ,
151- }
152-
153147#[ derive( Clone , PartialEq , Eq , Debug ) ]
154148pub enum Abi {
155149 Rust ,
You can’t perform that action at this time.
0 commit comments