rust/src
bors 36a74944cb Auto merge of #77526 - RalfJung:dont-promote-unions, r=lcnr
stop promoting union field accesses in 'const'

Turns out that promotion of union field accesses is the only difference between "promotion in `const`/`static` bodies" and "explicit promotion". So if we can remove this, we have finally achieved what I thought to already be the case -- that the bodies of `const`/`static` initializers behave the same as explicit promotion contexts.

The reason we do not want to promote union field accesses is that they can introduce UB, i.e., they can go wrong. We want to [minimize the ways promoteds can fail to evaluate](https://github.com/rust-lang/const-eval/issues/53). Also this change makes things more consistent overall, removing a special case that was added without much consideration (as far as I can tell).

Cc `@rust-lang/wg-const-eval`
2020-10-25 02:27:09 +00:00
..
bootstrap x.py test --test-args flag description enhancement 2020-10-23 20:06:37 +01:00
build_helper cleanup: Remove duplicate library names from Cargo.tomls 2020-08-30 22:57:54 +03:00
ci Rollup merge of #78309 2020-10-24 11:17:02 +02:00
doc Rollup merge of #78250 - camelid:document-inline-const, r=spastorino 2020-10-24 14:12:08 +02:00
etc BTreeMap: improve gdb introspection of BTreeMap with ZST keys or values 2020-10-14 13:03:23 +02:00
librustdoc Always store Rustdoc theme when it's changed 2020-10-23 18:58:42 +02:00
llvm-project@655a1467c9 Update LLVM for LLD COFF TLS alignment fix. 2020-10-17 01:34:08 -07:00
test Auto merge of #77526 - RalfJung:dont-promote-unions, r=lcnr 2020-10-25 02:27:09 +00:00
tools Add unbounded_depth to serde_json (clippy-driver) 2020-10-24 22:59:44 +02:00
README.md Update README.md 2020-08-30 13:40:11 -05:00
stage0.txt Rollup merge of #77877 - scottmcm:fewer-try-trait-method-references, r=shepmaster 2020-10-19 18:20:20 +02:00
version Bump version to 1.49.0 2020-10-02 08:39:40 -04:00

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

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