File tree 2 files changed +4
-13
lines changed
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> {
826
826
type T = stable_mir:: ty:: FnSig ;
827
827
fn stable ( & self , tables : & mut Tables < ' tcx > ) -> Self :: T {
828
828
use rustc_target:: spec:: abi;
829
- use stable_mir:: ty:: { Abi , FnSig , Unsafety } ;
829
+ use stable_mir:: ty:: { Abi , FnSig } ;
830
830
831
831
FnSig {
832
832
inputs_and_output : self
@@ -835,10 +835,7 @@ impl<'tcx> Stable<'tcx> for ty::FnSig<'tcx> {
835
835
. map ( |ty| tables. intern_ty ( ty) )
836
836
. collect ( ) ,
837
837
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) ,
842
839
abi : match self . abi {
843
840
abi:: Abi :: Rust => Abi :: Rust ,
844
841
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 } ;
2
2
use crate :: rustc_internal:: Opaque ;
3
3
4
4
#[ derive( Copy , Clone , Debug ) ]
@@ -140,16 +140,10 @@ pub type PolyFnSig = Binder<FnSig>;
140
140
pub struct FnSig {
141
141
pub inputs_and_output : Vec < Ty > ,
142
142
pub c_variadic : bool ,
143
- pub unsafety : Unsafety ,
143
+ pub unsafety : Safety ,
144
144
pub abi : Abi ,
145
145
}
146
146
147
- #[ derive( Clone , PartialEq , Eq , Debug ) ]
148
- pub enum Unsafety {
149
- Unsafe ,
150
- Normal ,
151
- }
152
-
153
147
#[ derive( Clone , PartialEq , Eq , Debug ) ]
154
148
pub enum Abi {
155
149
Rust ,
You can’t perform that action at this time.
0 commit comments