Jonathan Brouwer and GitHub
0c58e97926
Rollup merge of #158375 - khyperia:inline-consts-in-type-system, r=BoxyUwU
...
Support `DefKind::InlineConst` in `ConstKind::Unevaluated`
fixes https://github.com/rust-lang/project-const-generics/issues/101
required for https://github.com/rust-lang/project-const-generics/issues/108
consider: `Struct<{ (some, stuff, const { hi }) }>`. The following is very pseudocode-y, the important parts are whether it says AnonConst or InlineConst, not the Tuple stuff
- On stable, we represent this with: `AnonConst(Tuple(some, stuff, InlineConst(hi)))`
- Under mGCA, with "direct" arguments, before this PR, it was `Tuple(some, stuff, AnonConst(hi))`. The inner InlineConst got intercepted in the def_collector with hacks (`ConstArgContext`) and converted into an AnonConst, even though it has inline const syntax.
It would be nice to keep it as an InlineConst under mGCA, i.e. `Tuple(some, stuff, InlineConst(hi))`, and have the type system support passing around InlineConsts in `ConstKind::Unevaluated` (soon to be renamed `ConstKind::Alias`). This would allow the def collector to not need to know if we are in a "direct" or "regular/anon" context, which it turns out is extremely useful for implementing https://github.com/rust-lang/project-const-generics/issues/108 . Supporting InlineConsts in the type system are also useful for other things, for example, mentioned in https://github.com/rust-lang/project-const-generics/issues/101 is arg position const generics experiments.
This PR does two things:
- support InlineConsts in the type system (i.e. in `ConstKind::Unevaluated`)
- exercise that support, by no longer intercepting mGCA "direct" argument inline consts to be anon consts
r? @BoxyUwU
2026-06-30 03:41:33 +02:00
..
2026-02-06 15:35:18 +01:00
2026-02-09 07:59:24 -08:00
2026-04-02 12:04:25 +02:00
2026-02-09 07:59:24 -08:00
2026-01-08 11:09:07 -08:00
2025-12-23 13:54:59 +00:00
2026-01-07 08:44:32 +08:00
2026-01-08 10:52:58 -08:00
2026-01-08 10:52:58 -08:00
2026-03-06 05:39:07 +01:00
2026-06-17 16:34:03 +00:00
2026-06-17 16:34:03 +00:00
2026-06-17 16:34:03 +00:00
2026-06-17 16:34:03 +00:00
2026-02-26 04:36:03 +00:00
2026-02-26 04:36:03 +00:00
2026-02-16 01:35:50 +05:30
2026-02-16 01:35:50 +05:30
2026-02-12 03:50:58 +05:30
2026-02-12 03:50:58 +05:30
2026-04-14 09:43:02 +08:00
2026-04-14 09:43:02 +08:00
2026-04-14 09:43:02 +08:00
2026-04-14 09:43:02 +08:00
2026-01-10 12:45:26 +09:00
2026-01-10 12:45:26 +09:00
2026-01-10 12:45:26 +09:00
2026-02-25 04:05:12 +00:00
2026-02-25 04:05:12 +00:00
2026-02-09 07:59:24 -08:00
2026-01-10 12:45:26 +09:00
2026-01-10 12:45:26 +09:00
2026-01-10 12:45:26 +09:00
2026-02-12 03:50:58 +05:30
2026-02-12 03:50:58 +05:30
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-03-24 15:02:10 +00:00
2026-02-09 07:59:24 -08:00
2026-04-14 09:43:02 +08:00
2026-04-14 09:43:02 +08:00
2026-06-27 14:04:18 +08:00
2026-06-27 14:04:18 +08:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-03-17 15:24:03 +00:00
2026-03-17 15:24:03 +00:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-02-06 15:35:18 +01:00
2026-03-01 12:47:52 +09:00
2026-03-01 12:47:52 +09:00
2026-03-29 18:25:55 +00:00
2026-03-29 18:25:55 +00:00
2026-01-06 15:04:25 +00:00
2026-01-06 15:04:25 +00:00
2026-03-06 05:39:07 +01:00
2026-06-26 07:12:29 +00:00
2026-06-26 07:12:29 +00:00
2026-06-27 17:49:30 +02:00
2026-06-27 17:49:30 +02:00
2026-01-01 18:12:34 -08:00
2026-04-02 12:04:25 +02:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-04-02 12:04:25 +02:00
2026-06-25 17:12:10 +08:00
2026-06-25 17:12:10 +08:00
2026-03-06 05:39:07 +01:00
2026-02-14 04:12:46 +00:00
2026-06-10 23:43:11 +02:00
2026-06-10 23:43:11 +02:00
2026-06-10 23:43:11 +02:00
2026-01-01 18:12:34 -08:00
2026-01-01 18:12:34 -08:00
2026-01-01 18:12:34 -08:00
2026-03-17 21:02:09 +05:00
2026-03-17 21:02:09 +05:00
2026-03-17 21:02:09 +05:00
2026-02-12 03:50:58 +05:30
2026-02-12 03:50:58 +05:30
2026-01-01 18:12:34 -08:00
2026-01-01 18:12:34 -08:00
2026-03-17 15:24:03 +00:00
2026-03-17 15:24:03 +00:00
2025-06-13 07:48:00 +00:00
2025-06-13 07:48:00 +00:00
2026-02-09 07:59:24 -08:00
2026-02-06 14:04:55 +01:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-02-25 03:16:17 +00:00
2026-02-25 03:16:17 +00:00
2026-05-13 15:52:33 +10:00
2026-01-08 10:52:58 -08:00
2026-06-25 17:12:10 +08:00
2026-06-25 17:12:10 +08:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2025-12-05 00:39:55 +09:00
2025-12-05 00:39:55 +09:00
2026-01-01 18:12:34 -08:00
2026-04-02 12:04:25 +02:00
2026-01-01 18:12:34 -08:00
2026-04-02 12:04:25 +02:00
2026-02-13 09:54:04 +00:00
2026-04-02 12:04:25 +02:00
2025-12-23 13:54:59 +00:00
2026-03-23 20:08:24 +00:00
2026-03-23 20:08:24 +00:00
2026-06-09 02:22:45 +00:00
2026-06-09 02:22:45 +00:00
2026-06-09 02:22:45 +00:00
2026-03-03 17:08:26 +05:00
2026-03-03 17:08:26 +05:00
2026-06-27 14:04:18 +08:00
2026-06-27 14:04:18 +08:00
2026-02-09 07:59:24 -08:00
2026-01-04 15:12:39 +00:00
2026-04-02 12:04:25 +02:00
2026-02-13 09:54:04 +00:00
2026-02-13 09:54:04 +00:00
2026-01-04 15:12:39 +00:00
2026-01-04 15:12:39 +00:00
2026-01-04 15:12:39 +00:00
2026-01-04 15:12:39 +00:00
2026-06-22 07:13:11 +00:00
2026-06-22 07:13:11 +00:00
2026-02-16 01:35:50 +05:30
2026-04-02 12:04:25 +02:00
2026-06-22 07:13:11 +00:00
2026-06-22 07:13:11 +00:00
2026-02-09 07:59:24 -08:00
2026-06-22 07:13:11 +00:00
2026-06-22 07:13:11 +00:00
2026-02-14 04:12:46 +00:00
2026-02-14 04:12:46 +00:00
2026-01-04 15:12:39 +00:00
2026-01-04 15:12:39 +00:00
2026-06-13 09:20:48 +05:30
2026-06-13 09:20:48 +05:30
2026-06-13 09:20:48 +05:30
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-02-25 04:05:12 +00:00
2026-02-25 04:05:12 +00:00
2026-04-02 09:20:45 +00:00
2026-04-02 09:20:45 +00:00
2026-06-04 12:58:46 +09:00
2026-06-04 12:58:46 +09:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-04-02 12:04:25 +02:00
2026-02-09 07:59:24 -08:00
2026-04-02 12:04:25 +02:00
2026-02-25 04:05:12 +00:00
2026-02-25 04:05:12 +00:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-06-26 07:12:29 +00:00
2026-06-26 07:12:29 +00:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-02-19 10:07:06 +05:30
2026-02-19 10:07:06 +05:30
2026-02-10 07:34:53 +00:00
2026-06-08 21:47:02 +09:00
2026-06-14 04:02:35 +09:00
2026-06-08 21:47:02 +09:00
2026-06-14 04:02:35 +09:00
2026-06-08 21:47:02 +09:00
2026-06-08 21:46:57 +09:00
2026-06-08 21:46:57 +09:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-06-08 21:47:02 +09:00
2026-06-14 04:02:35 +09:00
2026-06-08 21:47:02 +09:00
2026-06-15 12:02:46 +00:00
2026-06-15 12:02:46 +00:00
2026-02-09 07:59:24 -08:00
2026-06-08 21:47:02 +09:00
2026-06-14 04:02:35 +09:00
2026-06-14 04:02:35 +09:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2026-03-23 20:08:24 +00:00
2026-03-23 20:08:24 +00:00
2026-02-09 07:59:24 -08:00
2026-03-24 15:02:10 +00:00
2025-12-15 22:59:15 +00:00
2025-12-15 22:59:15 +00:00
2026-02-26 04:36:03 +00:00
2026-02-26 04:36:03 +00:00
2026-02-09 07:59:24 -08:00
2026-01-22 15:06:22 +05:00
2026-01-22 15:06:22 +05:00
2026-01-22 15:06:22 +05:00