Matthias Krüger
3216098e53
Rollup merge of #140218 - fmease:hirtylo-clean-up-path-low, r=compiler-errors
...
HIR ty lowering: Clean up & refactor the lowering of type-relative paths
While rebasing #126651 I realized that HIR ty lowering could benefit from some *spring cleaning* now that it's been extended to handle RTN and mGCA paths.
More seriously, similar to my merged PR #118668 which unified the handling of all *associated item constraints* (assoc ty, const (ACE) & fn (RTN)), this PR (commit 695fcf517d ) partially[^1] deduplicates the resolution code for all *type-relative paths* (assoc ty, const (mGCA) & fn (RTN)).
**Why**? DRY'ing that part of the code means PR #126651 will automatically support RTN paths like `Ty::AssocTy::assoc_fn(..)` and it also implies shared diagnostic code and thus better diagnostics for RTN.
---
The other commits represent cleanups, renamings, moves. More notably, I've renamed path lowering methods to be a lot more descriptive, so ones lowering `QPath(Resolved)` paths now have `_resolved_` in their name and ones lowering `QPath(TypeRelative)` paths now have `_type_relative_` in their name. This should make it stupidly obvious what their purpose is.
---
Best reviewed commit by commit. The changes are close to trivial but the diff might make it look hairier.
r? compiler-errors
[^1]: Sadly, I couldn't unify as much compared to the other PR without introducing unnecessary `unreachable!()`s or rendering the code otherwise illegible with flags and micro helper traits.
2025-05-22 16:02:28 +02:00
..
2025-01-06 16:08:29 -08: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
2025-04-03 21:41:58 +00:00
2023-11-24 19:15:52 +01:00
2024-01-09 21:08:16 +00:00
2025-02-10 20:21:39 +00:00
2024-01-09 21:08:16 +00:00
2025-02-10 20:21:39 +00:00
2023-02-22 08:40:47 -07:00
2023-12-06 11:05:22 +01:00
2023-12-06 11:05:22 +01:00
2023-12-06 11:05:22 +01:00
2023-12-06 11:05:22 +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-11-26 02:50:48 +08: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
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-10-15 13:11:00 +02:00
2024-11-26 02:50:48 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2024-12-30 14:56:21 +07:00
2025-02-10 20:21:39 +00:00
2025-04-30 10:44:24 +03:00
2025-04-30 10:44:24 +03:00
2024-07-09 07:44:17 +00:00
2024-07-09 07:44:17 +00:00
2024-02-08 08:10:43 +00:00
2024-02-08 08:10:43 +00:00
2024-11-26 02:50:48 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-01-06 17:58:30 +00:00
2024-02-16 20:02:50 +00:00
2025-02-24 09:26:54 +00:00
2025-02-24 09:26:54 +00:00
2024-02-16 20:02:50 +00:00
2024-12-27 19:58:16 +11:00
2025-05-06 17:04:03 +02: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
2023-10-30 22:12:07 +00:00
2023-10-30 22:12:07 +00:00
2023-08-26 19:35:54 +00:00
2024-07-17 19:08:37 +08:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-07 10:42:01 +08:00
2023-11-24 19:15:52 +01:00
2024-11-26 02:50:48 +08: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-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-02-14 11:00:30 +00:00
2025-01-06 17:58:30 +00:00
2024-02-14 11:00:30 +00:00
2025-01-06 17:58:30 +00:00
2024-02-14 11:00:30 +00:00
2025-01-06 17:58:30 +00:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-02-16 20:02:50 +00:00
2024-04-11 16:41:41 +00:00
2024-07-26 14:41:56 -04:00
2025-02-21 19:32:45 +00:00
2025-02-21 19:32:45 +00:00
2025-02-21 19:32:45 +00:00
2025-02-21 19:32:45 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2025-04-30 10:44:24 +03:00
2025-04-30 10:44:24 +03:00
2025-01-06 16:08:29 -08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +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-07 10:42:01 +08:00
2024-11-26 02:50:48 +08: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-02-16 20:02:50 +00:00
2024-02-07 10:42:01 +08:00
2024-02-16 20:02:50 +00:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-02-16 20:02:50 +00:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08: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-01-24 02:53:15 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2025-02-26 05:11:18 +09:00
2025-02-26 05:11:18 +09:00
2025-03-30 01:32:21 +03:00
2023-12-12 17:40:53 +01:00
2025-03-30 01:32:21 +03:00
2023-12-12 17:40:53 +01:00
2023-11-24 19:15:52 +01:00
2025-03-30 01:32:21 +03:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-01-02 14:17:56 +00:00
2024-01-02 14:17:56 +00:00
2024-01-02 14:17:56 +00:00
2024-01-02 14:17:56 +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
2023-01-25 21:25:42 +01:00
2023-01-25 21:25:42 +01:00
2025-02-10 20:21:39 +00:00
2025-02-14 00:44:10 -08:00
2025-02-14 00:44:10 -08:00
2024-05-30 15:52:29 -04:00
2024-05-30 15:52:29 -04:00
2024-06-13 08:52:35 -04:00
2024-06-13 08:52:35 -04:00
2024-05-30 15:52:29 -04:00
2024-06-13 08:52:35 -04:00
2024-06-13 08:52:35 -04:00
2024-02-01 03:30:26 +00:00
2023-08-17 14:33:33 +02:00
2023-12-07 23:00:46 -05:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-14 11:00:30 +00:00
2024-10-29 16:26:57 +00:00
2025-04-08 23:06:31 +03:00
2023-11-24 19:15:52 +01:00
2025-02-14 00:37:23 +01:00
2025-02-14 00:37:23 +01:00
2024-02-14 11:00:30 +00:00
2024-10-29 16:26:57 +00:00
2025-04-08 23:06:31 +03:00
2025-02-14 00:37:23 +01:00
2024-02-14 11:00:30 +00:00
2024-11-12 02:08:39 +00:00
2024-02-14 11:00:30 +00:00
2024-11-12 02:08:39 +00:00
2024-02-14 11:00:30 +00:00
2024-11-12 02:08:39 +00:00
2024-11-12 02:08:39 +00:00
2024-12-07 21:29:58 +00:00
2025-04-08 23:06:31 +03:00
2024-12-07 22:18:51 +00:00
2025-03-03 23:53:42 +00:00
2025-03-03 23:53:42 +00:00
2024-10-16 13:44:56 -04:00
2024-01-19 23:55:05 +00:00
2024-01-22 17:52:36 +00:00
2024-01-19 23:55:05 +00:00
2025-02-10 20:21:39 +00:00
2025-04-09 20:26:58 +00:00
2025-04-09 20:26:58 +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-03-01 13:48:20 +00:00
2024-02-16 20:02:50 +00:00
2024-02-07 10:42:01 +08:00
2024-09-25 13:13:04 -04:00
2024-09-25 13:13:04 -04:00
2024-09-25 13:13:04 -04:00
2025-01-06 18:04:33 +00:00
2025-01-06 18:04:33 +00:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2023-11-24 19:15:52 +01:00
2024-02-14 11:00:30 +00:00
2024-02-14 11:00:30 +00:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-11-23 18:54:08 +00:00
2024-11-23 18:54:08 +00:00
2024-11-26 02:50:48 +08:00
2024-02-16 20:02:50 +00:00
2024-01-11 09:03:26 +00:00
2024-01-11 09:03:26 +00:00
2023-11-24 19:15:52 +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-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-02 15:34:37 -05:00
2024-04-24 22:21:15 +00:00
2024-03-03 16:30:48 -03:00
2024-03-03 16:30:48 -03:00
2023-11-24 19:15:52 +01:00
2024-12-07 21:29:58 +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
2023-08-28 17:47:37 -03:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2025-04-13 21:48:53 +03:00
2025-04-13 21:48:53 +03:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-14 11:00:30 +00:00
2025-03-14 19:50:03 +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-12-07 21:29:58 +00:00
2023-01-30 20:12:21 +00:00
2023-11-24 19:15:52 +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
2023-11-24 19:15:52 +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
2025-02-14 00:44:10 -08:00
2025-02-14 00:44:10 -08:00
2024-06-13 08:52:35 -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
2025-03-11 16:32:56 +00:00
2025-03-30 02:39:19 +00:00
2023-11-24 19:15:52 +01:00
2024-03-08 20:56:25 +00:00
2024-05-30 15:52:29 -04:00
2024-05-30 15:52:29 -04:00
2024-05-30 15:52:29 -04:00
2024-02-16 20:02:50 +00:00
2025-04-29 03:07:24 +00:00
2025-04-29 03:07:24 +00:00
2025-04-29 03:07:24 +00:00
2025-04-29 03:07:24 +00:00
2024-10-29 16:26:57 +00:00
2023-05-12 00:10:52 +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
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-04-08 23:06:31 +03:00
2023-11-24 19:15:52 +01:00
2023-01-30 21:51:33 +00:00
2023-01-30 21:51:33 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-01-07 16:04:14 +01:00
2024-02-16 20:02:50 +00:00
2025-04-30 18:07:52 +00:00
2025-04-30 18:07:52 +00:00
2024-11-23 18:54:08 +00:00
2024-12-11 19:53:40 +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-02-16 20:02:50 +00:00
2023-09-10 21:20:36 +00:00
2023-11-24 19:15:52 +01:00
2024-12-30 14:56:21 +07:00
2024-02-16 20:02:50 +00:00
2025-04-08 23:06:31 +03:00
2025-01-03 02:45:29 +00:00
2025-04-30 10:44:24 +03:00
2025-04-30 10:44:24 +03:00
2025-04-30 10:44:24 +03:00
2024-02-01 03:30:26 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00