@@ -102,27 +102,27 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
102
102
match prim_type {
103
103
// ints
104
104
hir:: PrimTy :: Int ( IntTy :: I8 ) => {
105
- let x = call :: < i8 > ( ptr, & libffi_args. as_slice ( ) ) ;
105
+ let x = call :: < i8 > ( ptr, libffi_args. as_slice ( ) ) ;
106
106
this. write_int ( x, dest) ?;
107
107
return Ok ( ( ) ) ;
108
108
}
109
109
hir:: PrimTy :: Int ( IntTy :: I16 ) => {
110
- let x = call :: < i16 > ( ptr, & libffi_args. as_slice ( ) ) ;
110
+ let x = call :: < i16 > ( ptr, libffi_args. as_slice ( ) ) ;
111
111
this. write_int ( x, dest) ?;
112
112
return Ok ( ( ) ) ;
113
113
}
114
114
hir:: PrimTy :: Int ( IntTy :: I32 ) => {
115
- let x = call :: < i32 > ( ptr, & libffi_args. as_slice ( ) ) ;
115
+ let x = call :: < i32 > ( ptr, libffi_args. as_slice ( ) ) ;
116
116
this. write_int ( x, dest) ?;
117
117
return Ok ( ( ) ) ;
118
118
}
119
119
hir:: PrimTy :: Int ( IntTy :: I64 ) => {
120
- let x = call :: < i64 > ( ptr, & libffi_args. as_slice ( ) ) ;
120
+ let x = call :: < i64 > ( ptr, libffi_args. as_slice ( ) ) ;
121
121
this. write_int ( x, dest) ?;
122
122
return Ok ( ( ) ) ;
123
123
}
124
124
hir:: PrimTy :: Int ( IntTy :: Isize ) => {
125
- let x = call :: < isize > ( ptr, & libffi_args. as_slice ( ) ) ;
125
+ let x = call :: < isize > ( ptr, libffi_args. as_slice ( ) ) ;
126
126
if isize:: BITS == 64 {
127
127
this. write_int ( x as i64 , dest) ?;
128
128
} else if usize:: BITS == 32 {
@@ -134,27 +134,27 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
134
134
}
135
135
// uints
136
136
hir:: PrimTy :: Uint ( UintTy :: U8 ) => {
137
- let x = call :: < u8 > ( ptr, & libffi_args. as_slice ( ) ) ;
137
+ let x = call :: < u8 > ( ptr, libffi_args. as_slice ( ) ) ;
138
138
this. write_int ( x, dest) ?;
139
139
return Ok ( ( ) ) ;
140
140
}
141
141
hir:: PrimTy :: Uint ( UintTy :: U16 ) => {
142
- let x = call :: < u16 > ( ptr, & libffi_args. as_slice ( ) ) ;
142
+ let x = call :: < u16 > ( ptr, libffi_args. as_slice ( ) ) ;
143
143
this. write_int ( x, dest) ?;
144
144
return Ok ( ( ) ) ;
145
145
}
146
146
hir:: PrimTy :: Uint ( UintTy :: U32 ) => {
147
- let x = call :: < u32 > ( ptr, & libffi_args. as_slice ( ) ) ;
147
+ let x = call :: < u32 > ( ptr, libffi_args. as_slice ( ) ) ;
148
148
this. write_int ( x, dest) ?;
149
149
return Ok ( ( ) ) ;
150
150
}
151
151
hir:: PrimTy :: Uint ( UintTy :: U64 ) => {
152
- let x = call :: < u64 > ( ptr, & libffi_args. as_slice ( ) ) ;
152
+ let x = call :: < u64 > ( ptr, libffi_args. as_slice ( ) ) ;
153
153
this. write_int ( x, dest) ?;
154
154
return Ok ( ( ) ) ;
155
155
}
156
156
hir:: PrimTy :: Uint ( UintTy :: Usize ) => {
157
- let x = call :: < usize > ( ptr, & libffi_args. as_slice ( ) ) ;
157
+ let x = call :: < usize > ( ptr, libffi_args. as_slice ( ) ) ;
158
158
if usize:: BITS == 64 {
159
159
this. write_int ( x as u64 , dest) ?;
160
160
} else if usize:: BITS == 32 {
@@ -168,7 +168,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
168
168
}
169
169
}
170
170
if matches ! ( external_fct_defn. output_type, hir:: FnRetTy :: DefaultReturn ( _) ) {
171
- call :: < ( ) > ( ptr, & libffi_args. as_slice ( ) ) ;
171
+ call :: < ( ) > ( ptr, libffi_args. as_slice ( ) ) ;
172
172
return Ok ( ( ) ) ;
173
173
}
174
174
// TODO ellen! deal with all the other return types
@@ -242,7 +242,7 @@ pub struct ExternalCFuncDeclRep<'hir> {
242
242
/// Enum of supported arguments to external C functions.
243
243
pub enum CArg {
244
244
/// Invalid argument (unsupported type).
245
- INVALID ,
245
+ Invalid ,
246
246
/// 8-bit signed integer.
247
247
Int8 ( i8 ) ,
248
248
/// 16-bit signed integer.
0 commit comments