bors
fd127a3a84
Auto merge of #135031 - RalfJung:intrinsics-without-body, r=oli-obk
...
rustc_intrinsic: support functions without body
We synthesize a HIR body `loop {}` but such bodyless intrinsics.
Most of the diff is due to turning `ItemKind::Fn` into a brace (named-field) enum variant, because it carries a `bool`-typed field now. This is to remember whether the function has a body. MIR building panics to avoid ever translating the fake `loop {}` body, and the intrinsic logic uses the lack of a body to implicitly mark that intrinsic as must-be-overridden.
I first tried actually having no body rather than generating the fake body, but there's a *lot* of code that assumes that all function items have HIR and MIR, so this didn't work very well. Then I noticed that even `rustc_intrinsic_must_be_overridden` intrinsics have MIR generated (they are filled with an `Unreachable` terminator) so I guess I am not the first to discover this. ;)
r? `@oli-obk`
2025-01-04 12:50:38 +00:00
..
2025-01-04 11:41:51 +01:00
2024-12-23 22:15:32 +00:00
2024-12-02 22:21:53 +00:00
2024-12-22 01:59:45 +00:00
2024-12-22 01:59:45 +00:00
2024-12-22 01:59:45 +00:00
2024-12-22 01:59:45 +00:00
2024-12-22 01:59:45 +00:00
2024-12-22 01:59:45 +00:00
2024-12-22 01:59:45 +00:00
2024-12-22 01:59:45 +00:00
2024-12-22 01:59:45 +00:00
2024-12-22 01:59:45 +00:00
2024-12-22 01:59:45 +00:00
2024-11-03 18:59:41 +00:00
2024-12-01 05:11:42 +00:00
2024-11-03 18:59:31 +00:00
2024-12-01 05:11:42 +00:00
2024-11-03 18:59:31 +00:00
2024-12-01 05:11:42 +00:00
2024-12-23 22:15:32 +00:00
2024-11-03 18:59:41 +00:00
2024-12-23 22:15:32 +00:00
2024-11-03 18:59:41 +00:00
2024-12-23 22:15:32 +00:00
2024-11-03 18:59:41 +00:00
2024-12-23 22:15:32 +00:00
2024-11-03 18:59:31 +00:00
2024-12-07 21:37:13 +00:00
2024-11-03 18:59:31 +00:00
2024-12-01 05:11:42 +00:00
2024-11-03 18:59:41 +00:00
2024-12-23 22:15:32 +00:00
2024-11-03 18:59:41 +00:00
2024-10-26 11:35:56 +08:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-11-21 18:56:49 +08:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-12-10 00:38:05 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-10 00:38:05 +00:00
2024-12-10 00:38:05 +00:00
2024-12-10 00:38:05 +00:00
2024-12-10 00:38:05 +00:00
2024-12-18 03:02:46 +00:00
2024-11-03 18:59:31 +00:00
2024-12-01 05:11:42 +00:00
2024-11-22 17:01:02 +00:00
2024-12-01 05:11:42 +00:00
2024-12-01 05:11:42 +00:00
2024-11-25 17:27:41 +00:00
2024-12-01 05:11:42 +00:00
2024-12-01 05:11:42 +00:00
2024-12-01 05:11:42 +00:00
2024-12-01 05:11:42 +00:00
2024-11-25 17:27:41 +00:00
2024-11-03 18:59:31 +00:00
2024-12-10 00:38:05 +00:00
2024-12-18 03:02:46 +00:00
2024-12-18 03:02:46 +00:00
2024-11-03 18:59:31 +00:00
2024-12-01 05:11:42 +00:00
2024-11-19 20:31:05 +00:00
2024-11-03 18:59:41 +00:00
2024-11-03 18:59:31 +00:00
2024-12-01 05:11:42 +00:00
2024-11-09 23:02:20 +01:00
2024-11-09 23:32:06 +01:00
2024-11-09 23:32:06 +01:00
2024-11-01 16:13:30 +00:00
2024-12-01 05:11:42 +00:00
2024-11-03 18:59:31 +00:00
2024-12-01 05:11:42 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-12-10 02:31:15 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-11-30 16:45:01 +00:00
2024-11-30 16:45:01 +00:00
2024-12-22 01:12:15 +00:00
2024-11-03 18:59:31 +00:00
2024-11-21 18:56:49 +08:00
2024-12-22 01:12:15 +00:00
2024-11-22 02:32:26 +00:00
2024-11-22 02:32:26 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-22 01:12:15 +00:00
2024-11-03 18:59:31 +00:00
2024-12-10 00:38:05 +00:00
2024-11-03 18:59:31 +00:00
2024-12-12 23:36:27 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-12-10 00:38:05 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-11-22 02:32:26 +00:00
2024-12-10 00:38:05 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-12-22 01:12:15 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-11-25 17:27:41 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-10-26 11:35:56 +08:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-10-26 11:35:56 +08:00
2024-10-26 11:35:56 +08:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-02 22:21:53 +00:00
2024-12-02 22:21:53 +00:00
2024-12-02 22:21:53 +00:00
2025-01-03 16:08:29 +01:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2025-01-02 15:21:41 +03:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-12-01 05:11:42 +00:00
2024-12-02 22:12:08 +00:00
2024-12-02 22:12:08 +00:00
2024-11-09 23:02:20 +01:00
2024-11-09 23:32:06 +01:00
2024-11-09 23:02:20 +01:00
2024-11-09 23:02:20 +01:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-01 05:11:42 +00:00
2024-12-01 05:11:42 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-10 00:38:05 +00:00
2024-12-10 00:38:05 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-10 00:38:05 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-11-29 06:10:15 +11:00
2024-11-03 18:59:31 +00:00
2024-12-01 05:11:42 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-11-29 06:10:15 +11:00
2024-11-03 18:59:41 +00:00
2024-11-29 06:10:15 +11:00
2024-11-03 18:59:31 +00:00
2024-12-10 00:38:05 +00:00
2024-12-22 01:12:15 +00:00
2024-12-22 01:12:15 +00:00
2024-11-03 18:59:31 +00:00
2024-12-01 05:11:42 +00:00
2024-11-03 18:59:31 +00:00
2024-11-03 18:59:31 +00:00
2024-12-07 21:37:13 +00:00
2024-11-03 18:59:41 +00:00
2024-12-01 05:11:42 +00:00