1
Fork 0

Put the RFC behind a feature gate result_ffi_guarantees

This commit is contained in:
Arvind Mukund 2024-03-18 20:31:48 -07:00
parent 437ca26de5
commit ed532cc186
8 changed files with 499 additions and 28 deletions

View file

@ -1142,6 +1142,10 @@ pub(crate) fn repr_nullable_ptr<'tcx>(
[var_one, var_two] => match (&var_one.fields.raw[..], &var_two.fields.raw[..]) {
([], [field]) | ([field], []) => field.ty(tcx, args),
([field1], [field2]) => {
if !tcx.features().result_ffi_guarantees {
return None;
}
let ty1 = field1.ty(tcx, args);
let ty2 = field2.ty(tcx, args);