rust/tests
bors b63223c152 Auto merge of #141759 - 1c3t3a:discriminants-query, r=saethlin
Insert checks for enum discriminants when debug assertions are enabled

Similar to the existing null-pointer and alignment checks, this checks for valid enum discriminants on creation of enums through unsafe transmutes. Essentially this sanitizes patterns like the following:
```rust
let val: MyEnum = unsafe { std::mem::transmute<u32, MyEnum>(42) };
```

An extension of this check will be done in a follow-up that explicitly sanitizes for extern enum values that come into Rust from e.g. C/C++.

This check is similar to Miri's capabilities of checking for valid construction of enum values.

This PR is inspired by saethlin@'s PR
https://github.com/rust-lang/rust/pull/104862. Thank you so much for keeping this code up and the detailed comments!

I also pair-programmed large parts of this together with vabr-g@.

r? `@saethlin`
2025-06-28 10:25:00 +00:00
..
assembly tests: s/C-cmse/cmse/ 2025-06-25 00:52:10 -07:00
auxiliary tests: Adopt ABI transmute tests from crashtests 2025-06-23 09:40:00 -07:00
codegen Rollup merge of #142768 - scottmcm:avoid-unneeded-bitcast, r=WaffleLapkin 2025-06-24 19:45:31 -07:00
codegen-units Auto merge of #142893 - Mark-Simulacrum:no-const-collect, r=oli-obk 2025-06-27 12:57:05 +00:00
coverage coverage: Revert "unused local file IDs" due to empty function names 2025-05-27 23:33:29 +10:00
coverage-run-rustdoc
crashes gce: don't ICE on non-local const 2025-06-27 18:07:07 +00:00
debuginfo tests: {Meta,Pointee}Sized in non-minicore tests 2025-06-16 23:04:33 +00:00
incremental compiletest: Improve diagnostics for line annotation mismatches 2025-06-23 21:30:56 +03:00
mir-opt Rollup merge of #142571 - cjgillot:borrowed-classes, r=oli-obk 2025-06-20 23:25:55 -04:00
pretty Move the place in &pin mut $place when !Unpin to ensure soundness 2025-06-15 10:31:11 +08:00
run-make Rollup merge of #140809 - bjorn3:panic_runtime_cleanup, r=petrochenkov 2025-06-27 22:13:01 +02:00
rustdoc Rollup merge of #139858 - oli-obk:new-const-traits-syntax, r=fee1-dead 2025-06-27 22:13:00 +02:00
rustdoc-gui rustdoc: make srcIndex no longer a global variable 2025-06-16 20:22:24 -05:00
rustdoc-js Migrate some tests away from concat-idents 2025-06-24 10:54:54 +00:00
rustdoc-js-std add doc(alias("AsciiChar")) to core::ascii::Char 2025-06-20 11:11:51 -05:00
rustdoc-json Rollup merge of #142919 - aDotInTheVoid:cold-cold-attr-for-you, r=GuillaumeGomez 2025-06-24 15:39:41 +02:00
rustdoc-ui Improve code and documentation 2025-06-23 16:12:49 +02:00
ui Auto merge of #141759 - 1c3t3a:discriminants-query, r=saethlin 2025-06-28 10:25:00 +00:00
ui-fulldeps Rollup merge of #142884 - makai410:coroutine-body, r=celinval 2025-06-26 15:47:21 +02:00
COMPILER_TESTS.md