diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2019-12-07 00:10:05 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-07 00:10:05 +0900 |
| commit | c85284ec58f353c9df7615f9f130f65572a3f639 (patch) | |
| tree | 12e3e839878ae783d2fcae5ee47c2f24ea61bd9d /src/test/debuginfo/enum-thinlto.rs | |
| parent | d1397db3f3e0010a2a2ce9efedc9903907143319 (diff) | |
| parent | f5bd94768a5ca901eb7555a4c3fd4d3005c1ad76 (diff) | |
| download | rust-c85284ec58f353c9df7615f9f130f65572a3f639.tar.gz rust-c85284ec58f353c9df7615f9f130f65572a3f639.zip | |
Rollup merge of #67054 - RalfJung:set-discriminant-unreachable, r=oli-obk
codegen "unreachable" for invalid SetDiscriminant Follow-up from https://github.com/rust-lang/rust/pull/66960. I also realized I don't understand our policy for using `abort` vs `unreachable`. AFAIK `abort` is safe to call and just aborts the process, while `unreachable` is UB. But sometimes we use both, like here https://github.com/rust-lang/rust/blob/d825e35ee8325146e6c175a4c61bcb645b347d5e/src/librustc_codegen_ssa/mir/block.rs#L827-L828 and here https://github.com/rust-lang/rust/blob/d825e35ee8325146e6c175a4c61bcb645b347d5e/src/librustc_codegen_ssa/mir/block.rs#L264-L265 The second case is even more confusing because that looks like an unreachable `return` to me, so why would we codegen a safe abort there? r? @eddyb Cc @oli-obk
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions
