diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-06-12 15:44:58 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-12 15:44:58 +0200 | 
| commit | c21de3c91eeb9fbb70ef616bf30ed31962c11e90 (patch) | |
| tree | 0e1a66672d9ef8ebc98f10a221a6f5f71da8fbb0 /compiler/rustc_const_eval/src | |
| parent | 99d0feedb8c6876bc444ee0da7329da2834985bb (diff) | |
| parent | bfb7757c3c059d3bbcfbc604ab326fa777be13aa (diff) | |
| download | rust-c21de3c91eeb9fbb70ef616bf30ed31962c11e90.tar.gz rust-c21de3c91eeb9fbb70ef616bf30ed31962c11e90.zip | |
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````
Diffstat (limited to 'compiler/rustc_const_eval/src')
0 files changed, 0 insertions, 0 deletions
