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