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
..
2024-12-08 15:32:04 +08:00
2024-08-04 00:11:16 +08:00
2024-07-12 03:02:57 +00:00
2024-12-13 07:10:20 +11:00
2025-01-02 23:39:16 +00:00
2024-10-28 14:20:28 +11:00
2024-07-18 20:08:38 +00:00
2024-11-24 19:42:33 +01:00
2024-12-21 03:02:07 +00:00
2024-12-21 02:46:33 +00:00
2024-08-01 13:11:24 +00:00
2024-10-30 16:47:47 -07:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-12-10 11:34:13 +08:00
2024-12-17 19:09:00 +08:00
2024-12-17 19:09:00 +08:00
2024-02-16 20:02:50 +00:00
2024-07-18 19:23:42 +00:00
2024-11-10 23:57:18 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-11-16 20:03:31 +00:00
2024-07-07 17:11:04 +02:00
2024-07-07 17:11:04 +02:00
2024-09-18 20:37:56 +02:00
2024-12-11 16:23:04 +01:00
2024-12-02 16:50:44 +00:00
2024-12-02 16:50:44 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-03-01 02:03:00 +00:00
2024-09-22 23:29:25 +03:00
2024-11-16 20:03:31 +00:00
2024-02-16 20:02:50 +00:00
2024-11-29 06:10:15 +11:00
2024-07-11 00:00:03 -04:00
2024-12-13 07:10:20 +11:00
2024-12-13 07:10:20 +11:00
2024-05-22 19:47:32 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-07-18 20:08:38 +00:00
2024-07-16 12:06:25 -04:00
2024-07-16 12:06:25 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-12-10 18:17:24 +00:00
2024-02-16 20:02:50 +00:00
2024-11-16 20:03:31 +00:00
2024-03-08 20:56:25 +00:00
2024-07-12 03:02:57 +00:00
2024-04-12 12:59:40 +09:00
2024-07-18 20:08:38 +00:00
2024-03-12 21:32:21 +01:00
2024-03-12 21:32:21 +01:00
2024-07-12 03:02:57 +00:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-06-04 14:19:42 -03:00
2024-06-04 14:19:42 -03:00
2024-05-11 15:49:51 -07:00
2024-11-16 20:03:31 +00:00
2024-02-22 18:05:28 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-12-26 20:59:14 -08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-04-22 17:47:35 +02:00
2024-04-22 17:47:35 +02:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-09-06 23:07:45 -04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-02-28 20:59:32 +11:00
2024-02-28 20:59:32 +11:00
2024-02-16 20:02:50 +00:00
2024-12-12 23:36:27 +00:00
2025-01-04 11:41:51 +01:00
2025-01-04 11:41:51 +01:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-10-11 11:30:08 -04:00
2024-10-11 11:30:08 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-03-07 23:03:42 +00:00
2024-11-22 11:12:15 -08:00
2024-07-11 12:12:00 +04:00
2024-07-11 12:12:00 +04:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-14 21:04:51 +00:00
2024-03-18 16:08:58 +00:00
2024-07-12 03:02:57 +00:00
2024-11-29 06:10:15 +11:00
2024-03-05 00:12:15 +01:00
2024-03-05 00:12:15 +01:00
2024-11-03 18:59:31 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-08-04 00:11:16 +08:00
2024-02-16 20:02:50 +00:00
2024-08-04 00:11:16 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-01 16:18:03 +01:00
2024-02-01 16:18:03 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-14 20:15:13 +00:00
2024-11-16 20:03:31 +00:00
2024-05-18 18:12:18 +02:00
2024-01-29 11:25:09 +11:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-07-12 03:02:57 +00:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:22:32 +00:00
2024-07-12 03:02:57 +00:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-25 17:01:32 +08:00
2024-07-25 17:01:32 +08:00
2024-02-16 20:02:50 +00:00
2024-03-01 02:03:00 +00:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-12-27 19:58:16 +11:00
2024-11-28 01:37:01 +00:00
2024-11-28 01:37:01 +00:00
2024-03-01 02:03:00 +00:00
2024-10-11 11:30:08 -04:00
2024-10-11 11:30:08 -04:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-11-26 02:50:48 +08:00
2024-02-16 20:02:50 +00:00
2024-03-22 17:25:57 +01:00
2024-07-18 20:08:38 +00:00
2024-07-18 20:08:38 +00:00
2024-02-16 20:02:50 +00:00
2023-12-28 15:02:17 +01:00
2023-12-28 15:02:17 +01:00
2024-01-28 16:12:21 +01:00
2024-11-23 08:57:25 -07:00
2024-01-28 16:12:21 +01:00
2024-11-23 08:57:25 -07:00
2024-11-24 19:42:33 +01:00
2024-11-24 19:42:33 +01:00
2024-01-28 16:12:21 +01:00
2024-11-23 08:57:25 -07:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-01-08 16:06:37 -08:00
2024-01-08 16:06:37 -08:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-07-16 12:06:25 -04:00
2024-07-16 12:06:25 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-18 20:08:38 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-12-09 21:55:13 +00:00
2024-12-09 21:55:13 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-10-29 16:26:57 +00:00
2024-02-16 20:02:50 +00:00
2024-07-18 18:20:35 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-11 20:39:24 +00:00
2024-11-17 22:30:11 +00:00
2024-08-09 05:52:53 +00:00
2024-08-09 05:52:53 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-07 10:42:01 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-11-17 22:30:11 +00:00
2024-11-17 22:30:11 +00:00
2024-05-20 19:55:59 -07:00
2024-03-18 21:35:18 -07:00
2024-07-18 19:23:42 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-06-17 22:35:25 -04:00
2024-07-12 03:02:57 +00:00
2024-07-12 03:02:57 +00:00
2024-07-12 03:02:57 +00:00
2024-07-12 03:02:57 +00:00
2024-09-25 13:26:48 +02:00
2024-02-16 20:02:50 +00:00
2024-04-12 12:59:40 +09:00
2024-04-12 12:59:40 +09:00
2024-04-12 12:59:40 +09:00
2024-09-21 20:29:22 +03:00
2024-09-21 20:29:22 +03:00
2024-09-21 20:29:22 +03:00
2024-09-21 20:07:52 +03:00
2024-09-21 20:07:52 +03:00
2024-09-21 20:07:52 +03:00
2024-02-16 20:02:50 +00:00
2024-12-04 19:52:53 +00:00
2024-12-04 19:52:53 +00:00
2024-02-14 20:15:13 +00:00
2024-02-16 20:02:50 +00:00
2024-07-18 20:08:38 +00:00
2024-07-18 20:08:38 +00:00
2024-03-17 23:35:18 +00:00
2024-03-17 23:35:18 +00:00
2024-07-12 03:02:57 +00:00
2024-12-31 05:03:22 +00:00
2024-12-31 05:03:22 +00:00
2024-07-18 20:08:38 +00:00
2024-07-12 03:02:57 +00:00
2024-11-15 17:43:29 +00:00
2024-11-15 17:43:29 +00:00
2024-11-15 17:43:29 +00:00
2024-07-23 00:29:39 -03:00
2024-07-23 00:29:39 -03:00
2024-07-23 00:29:39 -03:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-07-18 20:08:38 +00:00
2024-02-16 20:02:50 +00:00
2024-10-30 16:47:47 -07:00
2024-10-30 16:47:47 -07:00
2024-10-30 16:47:47 -07:00
2024-10-30 16:47:47 -07:00
2024-06-01 20:57:15 +02:00
2024-06-01 20:57:15 +02:00
2024-06-22 23:30:31 -07:00
2024-06-22 23:30:31 -07:00
2024-02-16 20:02:50 +00:00