rust/tests
Matthias Krüger 6e05afd744
Rollup merge of #132745 - RalfJung:pointee-info-inside-enum, r=DianQK
pointee_info_at: fix logic for recursing into enums

Fixes https://github.com/rust-lang/rust/issues/131834

The logic in `pointee_info_at` was likely written at a time when the null pointer optimization was the *only* enum layout optimization -- and as `Variant::Multiple` kept getting expanded, nobody noticed that the logic is now unsound.

The job of this function is to figure out whether there is a dereferenceable-or-null and aligned pointer at a given offset inside a type. So when we recurse into a multi-variant enum, we better make sure that all the other enum variants must be null! This is the part that was forgotten, and this PR adds it.

The reason this didn't explode in many ways so far is that our references only have 1 niche value (null), so it's not possible on stable to have a multi-variant enum with a dereferenceable pointer and other enum variants that are not null. But with `rustc_layout_scalar_valid_range` attributes one can force such a layout, and if `@the8472's` work on alignment niches ever lands, that will make this possible on stable.
2024-11-09 10:52:03 +01:00
..
assembly remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic functions instead 2024-11-08 09:16:00 +01:00
auxiliary Fix typo in tests/auxiliary/minicore.rs 2024-11-03 17:32:33 +09:00
codegen Rollup merge of #132745 - RalfJung:pointee-info-inside-enum, r=DianQK 2024-11-09 10:52:03 +01:00
codegen-units
coverage
coverage-run-rustdoc
crashes Auto merge of #132710 - matthiaskrgr:padautz, r=jieyouxu 2024-11-07 07:21:20 +00:00
debuginfo
incremental
mir-opt Rollup merge of #131913 - jieyouxu:only_debug_assertions, r=onur-ozkan 2024-11-07 18:48:21 -08:00
pretty
run-make Auto merge of #128849 - estebank:issue-89143, r=jackh726 2024-11-08 00:34:48 +00:00
rustdoc remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic functions instead 2024-11-08 09:16:00 +01:00
rustdoc-gui
rustdoc-js
rustdoc-js-std
rustdoc-json
rustdoc-ui Add UI regressions tests for rustdoc --show-coverage option 2024-11-04 14:46:04 +01:00
ui Rollup merge of #132552 - taiki-e:sparc-target-feature, r=workingjubilee 2024-11-09 10:52:03 +01:00
ui-fulldeps Rollup merge of #132131 - celinval:smir-crate-defs, r=compiler-errors 2024-11-07 18:48:22 -08:00
COMPILER_TESTS.md