rust/src
bors 557359f925 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.
2023-07-21 15:00:36 +00:00
..
bootstrap Rollup merge of #113800 - oli-obk:gha_ci_cycle, r=jyn514 2023-07-20 17:19:32 +02:00
ci Auto merge of #113714 - Kobzol:ci-cmake, r=nikic 2023-07-17 15:46:43 +00:00
doc Simplify wording in guide for unbraced closures 2023-07-21 02:57:51 -07:00
etc Improve htmldocck error a bit by providing line where error occurred 2023-07-19 14:34:06 +02:00
librustdoc Rollup merge of #113883 - steffahn:rustdoc-search-crate-selector-padding, r=GuillaumeGomez 2023-07-20 17:19:34 +02:00
llvm-project@06248fa7f3 Update LLVM submodule 2023-06-20 00:49:54 +01:00
rustdoc-json-types Verify that ItemEnum can be serialized and then deserialized using bincode 2023-05-22 18:26:20 +01:00
tools CTFE: move target_{i, u}size_{min, max) to rustc_abi::TargetDataLayout 2023-07-21 03:31:47 +02:00
README.md Remove stale reference to the test suite location 2023-01-13 11:49:06 +00:00
stage0.json Bump bootstrap compiler to latest 2023-07-12 21:26:04 -04:00
version Bump version 2023-07-08 10:35:49 -04:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.