Skip to content

Commit 8704a66

Browse files
committed
Allow returning PassMode::Cast directly to an ssa var
1 parent bab224d commit 8704a66

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/abi/returning.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ pub(crate) fn can_return_to_ssa_var<'tcx>(
4444
FnAbi::of_fn_ptr(&RevealAllLayoutCx(fx.tcx), fn_ty.fn_sig(fx.tcx), &extra_args)
4545
};
4646
match fn_abi.ret.mode {
47-
PassMode::Ignore | PassMode::Direct(_) | PassMode::Pair(_, _) => true,
48-
// FIXME Make it possible to return Cast and Indirect to an ssa var.
49-
PassMode::Cast(_) | PassMode::Indirect { .. } => false,
47+
PassMode::Ignore | PassMode::Direct(_) | PassMode::Pair(_, _) | PassMode::Cast(_) => true,
48+
// FIXME Make it possible to return Indirect to an ssa var.
49+
PassMode::Indirect { .. } => false,
5050
}
5151
}
5252

0 commit comments

Comments
 (0)