Guillaume Gomez
c21de3c91e
Rollup merge of #126228 - BoxyUwU:nested_repeat_expr_generics, r=compiler-errors
...
Provide correct parent for nested anon const
Fixes #126147
99% of this PR is just comments explaining what the issue is.
`tcx.parent(` and `hir().get_parent_item(` give different results as the hir owner for all the hir of anon consts is the enclosing function. I didn't attempt to change that as being a hir owner requires a `DefId` and long term we want to stop creating anon consts' `DefId`s before hir ty lowering.
So i just opted to change `generics_of` to use `tcx.parent` to get the parent for `AnonConst`'s. I'm not entirely sure about this being what we want, it does seem weird that we have two ways of getting the parent of an `AnonConst` and they both give different results.
Alternatively we could just go ahead and make `const_evaluatable_unchecked` a hard error and stop providing generics to repeat exprs. Then this isn't an issue. (The FCW has been around for almost 4 years now)
r? ````@compiler-errors````
2024-06-12 15:44:58 +02:00
..
2024-06-05 22:25:42 +01:00
2024-02-16 20:02:50 +00:00
2024-03-11 19:42:04 +00:00
2024-02-16 20:02:50 +00:00
2024-06-05 23:20:09 +08:00
2024-02-16 20:02:50 +00:00
2024-05-29 17:06:54 +01:00
2024-06-07 20:14:28 +02:00
2023-11-24 19:15:52 +01:00
2024-06-05 22:25:42 +01:00
2024-03-20 17:29:58 +00:00
2024-03-20 13:00:34 -04:00
2024-03-22 17:12:43 +01:00
2024-05-30 22:52:33 +02:00
2024-03-18 16:08:58 +00:00
2024-03-18 16:08: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-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-05-05 21:42:54 +01:00
2023-05-05 21:42:54 +01:00
2024-01-09 21:08:16 +00:00
2024-01-09 21:08:16 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-01-27 19:26:04 +01:00
2024-03-01 02:03:00 +00:00
2024-01-23 15:23:22 +00:00
2024-01-23 15:23:22 +00:00
2024-05-29 17:06:54 +01:00
2024-05-29 17:06:54 +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-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-30 20:59:51 +01:00
2024-04-09 23:58:18 +02: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-03-21 00:03:59 +00:00
2024-02-14 11:00:30 +00:00
2024-02-16 20:02:50 +00:00
2023-11-30 20:59:51 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-04-10 20:36:14 +00:00
2024-04-10 20:36:14 +00:00
2024-04-10 20:36:14 +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-03-18 16:08:58 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-05-05 21:42:54 +01:00
2024-03-18 16:08:58 +00:00
2024-02-16 20:02:50 +00:00
2023-02-16 15:14:45 +11:00
2023-11-24 19:15:52 +01:00
2024-06-05 22:25:42 +01:00
2024-06-05 22:25:42 +01:00
2024-06-05 22:25:42 +01:00
2023-06-01 18:21:42 +00:00
2023-11-24 19:15:52 +01: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
2023-12-24 01:58:13 +08:00
2023-12-24 01:58:13 +08:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01: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-07 10:42:01 +08:00
2024-03-21 00:03:59 +00:00
2024-02-16 20:02:50 +00:00
2024-03-27 14:02:15 +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
2023-11-24 19:15:52 +01:00
2024-03-21 00:03:59 +00:00
2024-02-16 20:02:50 +00:00
2023-09-28 23:10:04 +00:00
2024-02-16 20:02:50 +00:00
2024-02-14 11:00:30 +00:00
2024-02-14 11:00:30 +00:00
2024-02-16 20:02:50 +00:00
2023-06-01 18:21:42 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-12-02 10:38:42 +01:00
2023-12-02 10:38:42 +01:00
2023-11-24 19:15:52 +01:00
2024-03-21 20:36:13 +01:00
2024-03-21 20:36:13 +01:00
2024-02-16 20:02:50 +00:00
2023-02-23 10:27:06 -07: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-03-18 16:08:58 +00:00
2024-02-16 20:02:50 +00:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2023-11-24 19:15:52 +01:00
2023-06-01 18:21:42 +00:00
2023-06-01 18:21:42 +00:00
2024-02-18 19:16:17 -03:00
2024-02-18 19:16:17 -03:00
2024-02-16 20:02:50 +00:00
2024-02-01 16:18:03 +01:00
2023-06-01 18:21:42 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-06-01 18:21:42 +00:00
2023-11-24 19:15:52 +01:00
2023-07-27 15:51:02 +00:00
2024-03-18 16:08: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-02-16 20:02:50 +00:00
2023-06-11 16:12:59 +08:00
2023-11-24 19:15:52 +01:00
2024-04-16 11:52:12 +00:00
2024-04-16 11:52:12 +00:00
2024-02-16 20:02:50 +00:00
2023-11-30 20:59:51 +01:00
2024-02-16 20:02:50 +00:00
2023-08-08 14:48:17 +08:00
2024-03-18 16:08:58 +00:00
2024-05-14 20:28:55 +08:00
2024-05-14 20:28:55 +08:00
2023-11-24 19:15:52 +01:00
2024-03-18 16:08:58 +00:00
2024-02-16 20:02:50 +00:00
2024-06-05 22:25:42 +01:00
2024-06-05 22:25:42 +01:00
2024-04-04 15:02:27 +00:00
2024-04-04 15:02:27 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2023-05-05 21:42:54 +01:00
2023-11-30 20:59:51 +01:00
2024-02-16 20:02:50 +00:00
2023-11-30 20:59:51 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-03-11 19:42:04 +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
2023-09-28 23:10:04 +00:00
2024-02-16 20:02:50 +00:00
2024-02-14 11:00:30 +00:00
2024-02-14 11:00:30 +00:00
2024-02-16 20:02:50 +00:00
2024-06-10 14:32:50 +01:00
2024-06-10 14:32:50 +01:00
2024-03-18 16:08:58 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-05-04 11:22:40 +01:00
2023-05-04 11:22:40 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-04-07 11:18:07 -07:00
2023-04-07 11:18:07 -07:00
2024-03-18 16:08:58 +00:00
2024-02-16 20:02:50 +00:00
2024-03-21 10:45:30 +00:00
2024-06-05 22:25:42 +01:00
2024-03-21 10:45:30 +00:00
2024-06-05 23:20:09 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-03-09 20:49:11 +00:00
2024-03-11 21:28:16 +00:00
2024-06-05 22:25:42 +01:00
2024-06-05 22:25:42 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-01-30 20:12:19 +00:00
2023-01-30 20:12:19 +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
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
2023-01-14 15:49:08 +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
2023-05-05 21:42:54 +01:00
2023-05-05 21:42:54 +01: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-02-14 21:04:51 +00:00