diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-07-17 12:58:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-17 12:58:54 +0200 |
| commit | 93b9812be840ec218bf499dcc5c6f81f20ea3002 (patch) | |
| tree | 99f59b3ad68e0fcc2e60459b7def45ba2d92c656 /compiler/rustc_parse/src | |
| parent | eca9c0101c98df239e02c34f7b802cf775b86d08 (diff) | |
| parent | 56633b3f51967f544c988dcabbcd1b99f4cc3558 (diff) | |
| download | rust-93b9812be840ec218bf499dcc5c6f81f20ea3002.tar.gz rust-93b9812be840ec218bf499dcc5c6f81f20ea3002.zip | |
Rollup merge of #113770 - dtolnay:derivevoid, r=compiler-errors,nnethercote
Generate safe stable code for derives on empty enums
Generate `match *self {}` instead of `unsafe { core::intrinsics::unreachable() }`.
This is:
1. safe
2. stable
for the benefit of everyone looking at these derived impls through `cargo expand`.
[Both expansions compile to the same code at all optimization levels (including `0`).](https://rust.godbolt.org/z/P79joGMh3)
Diffstat (limited to 'compiler/rustc_parse/src')
0 files changed, 0 insertions, 0 deletions
