rust/tests
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
..
assembly Rollup merge of #125980 - kjetilkjeka:nvptx_remove_direct_passmode, r=davidtwco 2024-06-12 03:57:20 -07:00
auxiliary
codegen Auto merge of #126319 - workingjubilee:rollup-lendnud, r=workingjubilee 2024-06-12 11:10:50 +00:00
codegen-units
coverage
coverage-run-rustdoc
crashes
debuginfo
incremental
mir-opt
pretty
run-make Use fs_wrapper in run-make/prefer-dylib 2024-06-12 11:46:05 +02:00
run-pass-valgrind
rustdoc
rustdoc-gui
rustdoc-js
rustdoc-js-std
rustdoc-json
rustdoc-ui
ui Rollup merge of #126228 - BoxyUwU:nested_repeat_expr_generics, r=compiler-errors 2024-06-12 15:44:58 +02:00
ui-fulldeps
COMPILER_TESTS.md