rust/tests
bors af06dce64b Auto merge of #106281 - JulianKnodt:transmute_const_generics, r=b-naber
Add ability to transmute (somewhat) with generic consts in arrays

Previously if the expression contained generic consts and did not have a directly equivalent type, transmuting the type in this way was forbidden, despite the two sizes being identical. Instead, we should be able to lazily tell if the two consts are identical, and if so allow them to be transmuted.

This is done by normalizing the forms of expressions into sorted order of multiplied terms, which is not generic over all expressions, but should handle most cases.

This allows for some _basic_ transmutations between types that are equivalent in size without requiring additional stack space at runtime.

I only see one other location at which `SizeSkeleton` is being used, and it checks for equality so this shouldn't affect anywhere else that I can tell.

See [this Stackoverflow post](https://stackoverflow.com/questions/73085012/transmute-nested-const-generic-array-rust) for what was previously necessary to convert between types. This PR makes converting nested `T -> [T; 1]` transmutes possible, and `[uB*2; N] -> [uB; N * 2]` possible as well.

I'm not sure whether this is something that would be wanted, and if it is it definitely should not be insta-stable, so I'd add a feature gate.
2023-04-08 19:47:22 +00:00
..
assembly Fix an assembly test with a hard-coded hash 2023-04-05 15:59:29 +00:00
auxiliary
codegen Auto merge of #107925 - thomcc:sip13, r=cjgillot 2023-04-05 18:35:34 +00:00
codegen-units Use unused_generic_params from crate metadata 2023-03-14 16:33:12 +00:00
debuginfo Fix function order in an msvc debuginfo test 2023-04-05 15:59:29 +00:00
incremental Rollup merge of #105793 - lukas-code:circular-deps, r=Mark-Simulacrum 2023-03-19 15:33:55 +05:30
mir-opt Auto merge of #102906 - nbdd0121:mir, r=wesleywiser,tmiasko 2023-04-07 10:31:14 +00:00
pretty Auto merge of #108148 - parthopdas:master, r=oli-obk 2023-03-20 03:24:27 +00:00
run-make Fix coverage test 2023-04-07 10:18:28 +01:00
run-make-fulldeps try to fix test-various 2023-04-02 17:54:24 -04:00
run-pass-valgrind
rustdoc Bless rustdoc test with swapped ids 2023-04-05 15:59:29 +00:00
rustdoc-gui Rollup merge of #110037 - notriddle:notriddle/theme-default, r=GuillaumeGomez 2023-04-08 10:26:14 +02:00
rustdoc-js rustdoc: add support for type filters in arguments and generics 2023-03-20 22:41:57 -07:00
rustdoc-js-std rustdoc: add support for type filters in arguments and generics 2023-03-20 22:41:57 -07:00
rustdoc-json Update tests for rustc_doc_primitive 2023-03-30 22:56:52 +02:00
rustdoc-ui Bless rustdoc-ui test with new errors order 2023-04-05 15:59:29 +00:00
ui Auto merge of #106281 - JulianKnodt:transmute_const_generics, r=b-naber 2023-04-08 19:47:22 +00:00
ui-fulldeps Auto merge of #109663 - fee1-dead-contrib:rustc_macros-syn-2.0, r=Nilstrieb 2023-04-07 03:37:21 +00:00
COMPILER_TESTS.md