diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-07-28 18:27:06 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2021-07-28 18:27:06 +0200 |
| commit | 8704a66922e9fbe3fafb4d27eeb13b34e8cebd82 (patch) | |
| tree | 5ff33a7cfd187885d23e05ba753c412474cb459b | |
| parent | bab224d254803f840aa7138f2712fbe9b2fbc87b (diff) | |
| download | rust-8704a66922e9fbe3fafb4d27eeb13b34e8cebd82.tar.gz rust-8704a66922e9fbe3fafb4d27eeb13b34e8cebd82.zip | |
Allow returning PassMode::Cast directly to an ssa var
| -rw-r--r-- | src/abi/returning.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/abi/returning.rs b/src/abi/returning.rs index cb2beed2ca7..3b126938f14 100644 --- a/src/abi/returning.rs +++ b/src/abi/returning.rs @@ -44,9 +44,9 @@ pub(crate) fn can_return_to_ssa_var<'tcx>( FnAbi::of_fn_ptr(&RevealAllLayoutCx(fx.tcx), fn_ty.fn_sig(fx.tcx), &extra_args) }; match fn_abi.ret.mode { - PassMode::Ignore | PassMode::Direct(_) | PassMode::Pair(_, _) => true, - // FIXME Make it possible to return Cast and Indirect to an ssa var. - PassMode::Cast(_) | PassMode::Indirect { .. } => false, + PassMode::Ignore | PassMode::Direct(_) | PassMode::Pair(_, _) | PassMode::Cast(_) => true, + // FIXME Make it possible to return Indirect to an ssa var. + PassMode::Indirect { .. } => false, } } |
