diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-23 09:13:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-23 09:13:59 +0000 |
commit | de9af784e79926d01e8c030e999becc4b8bfad0f (patch) | |
tree | eec0947af5d1e9bcbddb29c3b1935136d1948e98 /gcc/rust/backend/rust-compile-item.h | |
parent | dd3c58b2ce55ce6585916607927c3bca087610c6 (diff) | |
parent | 28895c1265e19a3e854040610d8478cfb8768d0a (diff) | |
download | gcc-de9af784e79926d01e8c030e999becc4b8bfad0f.zip gcc-de9af784e79926d01e8c030e999becc4b8bfad0f.tar.gz gcc-de9af784e79926d01e8c030e999becc4b8bfad0f.tar.bz2 |
Merge #380
380: Fix issues about block expression evaluation r=philberty a=lrh2000
I've tried my best to split https://github.com/Rust-GCC/gccrs/pull/364. Its core part is here. All unrelated fixes should have been removed and I will make them separate PRs, but this PR still has to contain 2 commits and introduce limited support for the never type.
https://github.com/Rust-GCC/gccrs/blob/935aff52a66a70e1e96f0a6aa7e0ad37eda3f93c/gcc/testsuite/rust.test/compile/deadcode1.rs#L7-L15
https://github.com/Rust-GCC/gccrs/blob/935aff52a66a70e1e96f0a6aa7e0ad37eda3f93c/gcc/testsuite/rust.test/compile/implicit_returns1.rs#L44-L50
The reason is that the above two tests failed to pass simultaneously after the first commit. The first test requires the `if/else` expression resolves to `()` but the second test requires the `if/else` expression resolves to `<integer>`. They are conflicted.
I wonder whether or not this PR is OK, and anyway thanks for your review.
Co-authored-by: lrh2000 <lrh2000@pku.edu.cn>
Diffstat (limited to 'gcc/rust/backend/rust-compile-item.h')
0 files changed, 0 insertions, 0 deletions