rust/src/test
Guillaume Gomez 3e802d72bb
Rollup merge of #96814 - RalfJung:enum-repr-align, r=oli-obk
Fix repr(align) enum handling

`enum`, for better or worse, supports `repr(align)`. That has already caused a bug in https://github.com/rust-lang/rust/issues/92464, which was "fixed" in https://github.com/rust-lang/rust/pull/92932, but it turns out that that fix is wrong and caused https://github.com/rust-lang/rust/issues/96185.

So this reverts #92932 (which fixes #96185), and attempts another strategy for fixing #92464: special-case enums when doing a cast, re-using the code to load the discriminant rather than assuming that the enum has scalar layout. This works fine for the interpreter.

However, #92464 contained another testcase that was previously not in the test suite -- and after adding it, it ICEs again. This is not surprising; codegen needs the same patch that I did in the interpreter. Probably this has to happen [around here](d32ce37a17/compiler/rustc_codegen_ssa/src/mir/rvalue.rs (L276)). Unfortunately I don't know how to do that -- the interpreter can load a discriminant from an operand, but codegen can only do that from a place. `@oli-obk` `@eddyb` `@bjorn3` any idea?
2022-07-05 23:43:30 +02:00
..
assembly hexagon: adapt test for upstream output changes 2022-06-07 13:21:34 -04:00
auxiliary
codegen Rollup merge of #98920 - krasimirgg:llvm-15-issue-37945, r=nikic 2022-07-05 17:08:14 +02:00
codegen-units Fix/bless tests broken by DSE 2022-05-24 22:50:21 -04:00
debuginfo Auto merge of #96820 - r-raymond:master, r=cuviper 2022-06-25 13:03:53 +00:00
incremental incr.comp.: Make split-dwarf commandline options [TRACKED]. 2022-07-04 14:11:28 +02:00
mir-opt Auto merge of #96862 - oli-obk:enum_cast_mir, r=RalfJung 2022-07-05 09:36:29 +00:00
pretty Add pp-exact test involving where T: 2022-06-16 17:03:47 -07:00
run-make Auto merge of #98573 - krasimirgg:nlmb-llvm-nm, r=nikic 2022-07-04 15:59:44 +00:00
run-make-fulldeps Don't use match-destructuring for derived ops on structs. 2022-07-04 10:48:15 +10:00
run-pass-valgrind Change enum->int casts to not go through MIR casts. 2022-06-30 07:47:07 +00:00
rustdoc Rollup merge of #98856 - GuillaumeGomez:rustdoc-test-rm-fixme, r=Dylan-DPC 2022-07-05 16:04:34 +05:30
rustdoc-gui Rollup merge of #98776 - notriddle:notriddle/mobile-sidebar-auto-close, r=GuillaumeGomez 2022-07-05 16:04:33 +05:30
rustdoc-js rustdoc: also index raw pointers 2022-05-31 11:21:55 -07:00
rustdoc-js-std Rollup merge of #96887 - notriddle:notriddle/as-raw-fd, r=jsha 2022-05-11 13:16:31 +09:00
rustdoc-json rustdoc-json: Make default value of blanket impl assoc types work 2022-06-29 21:05:51 +02:00
rustdoc-ui add regression test for #79467 2022-07-04 22:29:03 +09:00
ui Rollup merge of #96814 - RalfJung:enum-repr-align, r=oli-obk 2022-07-05 23:43:30 +02:00
ui-fulldeps tests: avoid inadvertent diffs in diag derive test 2022-06-30 08:59:22 +01:00
COMPILER_TESTS.md