diff options
| author | bors <bors@rust-lang.org> | 2023-07-21 15:00:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-07-21 15:00:36 +0000 |
| commit | e865542981fb6633cab9298c7b5aedd490016287 (patch) | |
| tree | 569de321711d71b04883015fe887e4fcd1e11893 /tests/codegen/array-codegen.rs | |
| parent | c022c81ece9b205eb2921e5cda8d514f40c74a7c (diff) | |
| parent | 1984e208e06f320d62306e19940b86156460f98e (diff) | |
| download | rust-e865542981fb6633cab9298c7b5aedd490016287.tar.gz rust-e865542981fb6633cab9298c7b5aedd490016287.zip | |
Auto merge of #113166 - moulins:ref-niches-initial, r=oli-obk
Prototype: Add unstable `-Z reference-niches` option MCP: rust-lang/compiler-team#641 Relevant RFC: rust-lang/rfcs#3204 This prototype adds a new `-Z reference-niches` option, controlling the range of valid bit-patterns for reference types (`&T` and `&mut T`), thereby enabling new enum niching opportunities. Like `-Z randomize-layout`, this setting is crate-local; as such, references to built-in types (primitives, tuples, ...) are not affected. The possible settings are (here, `MAX` denotes the all-1 bit-pattern): | `-Z reference-niches=` | Valid range | |:---:|:---:| | `null` (the default) | `1..=MAX` | | `size` | `1..=(MAX- size)` | | `align` | `align..=MAX.align_down_to(align)` | | `size,align` | `align..=(MAX-size).align_down_to(align)` | ------ This is very WIP, and I'm not sure the approach I've taken here is the best one, but stage 1 tests pass locally; I believe this is in a good enough state to unleash this upon unsuspecting 3rd-party code, and see what breaks.
Diffstat (limited to 'tests/codegen/array-codegen.rs')
0 files changed, 0 insertions, 0 deletions
