Make *const (), *mut () okay for FFI
This commit is contained in:
parent
c17e3e2c09
commit
abfad74ec6
3 changed files with 11 additions and 11 deletions
|
@ -1060,6 +1060,15 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
|
|||
FfiSafe
|
||||
}
|
||||
|
||||
ty::RawPtr(ty::TypeAndMut { ty, .. })
|
||||
if match ty.kind() {
|
||||
ty::Tuple(tuple) => tuple.is_empty(),
|
||||
_ => false,
|
||||
} =>
|
||||
{
|
||||
FfiSafe
|
||||
}
|
||||
|
||||
ty::RawPtr(ty::TypeAndMut { ty, .. }) | ty::Ref(_, ty, _) => {
|
||||
self.check_type_for_ffi(cache, ty)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue