Files
rust/tests/ui
Matthias Krüger 93b9812be8 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)
2023-07-17 12:58:54 +02:00
..
2023-01-30 20:12:19 +00:00
2023-05-24 19:35:59 -03:00
2023-05-30 13:03:40 +02:00
2023-04-03 09:24:11 +02:00
2023-05-08 17:58:01 -03:00
2023-05-08 17:58:01 -03:00
2023-07-03 09:12:15 +02:00
2023-01-30 20:12:19 +00:00
2023-06-10 14:46:11 -04:00
2023-07-10 20:09:28 +00:00
2023-04-29 13:01:46 +01:00
2023-07-01 02:28:15 -04:00
2023-07-11 17:52:43 +08:00
2023-06-29 16:24:07 +03:00
2023-06-26 08:56:32 +00:00
2023-04-03 09:24:11 +02:00
2023-05-05 14:58:52 -07:00
2023-06-06 18:43:20 +00:00
2023-04-19 19:13:45 +00:00
2023-04-13 22:10:26 -05:00
2023-06-20 19:46:01 -04:00
2023-05-08 03:36:30 +00:00
2023-05-29 12:07:41 -03:00
2023-03-29 18:04:44 -04:00
2023-04-26 21:02:56 +02:00
2023-06-12 20:24:48 +08:00
2023-04-29 13:01:46 +01:00
2023-05-12 00:10:52 +00:00
2023-03-08 00:00:18 +00:00
2023-04-13 22:10:26 -05:00
2023-04-13 22:10:26 -05:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00