rust/src/test
bors 9ed5b94b28 Auto merge of #90373 - tmiasko:union-qualification, r=oli-obk
Use type based qualification for unions

Union field access is currently qualified based on the qualification of
a value previously assigned to the union. At the same time, every union
access transmutes the content of the union, which might result in a
different qualification.

For example, consider constants A and B as defined below, under the
current rules neither contains interior mutability, since a value used
in the initial assignment did not contain `UnsafeCell` constructor.

```rust
#![feature(untagged_unions)]

union U { i: u32, c: std::cell::Cell<u32> }
const A: U = U { i: 0 };
const B: std::cell::Cell<u32> = unsafe { U { i: 0 }.c };
```

To avoid the issue, the changes here propose to consider the content of
a union as opaque and use type based qualification for union types.

Fixes #90268.

`@rust-lang/wg-const-eval`
2021-10-29 12:21:09 +00:00
..
assembly Update the minimum external LLVM to 12 2021-10-22 10:50:07 -07:00
auxiliary
codegen Auto merge of #89652 - rcvalle:rust-cfi, r=nagisa 2021-10-27 09:19:42 +00:00
codegen-units Support incremental in compiletest for non-incremental modes. 2021-09-23 12:16:51 -07:00
debuginfo Fix function-names test for GDB 10.1 2021-10-11 17:20:45 +02:00
incremental Rollup merge of #89895 - camsteffen:for-loop-head-span, r=davidtwco 2021-10-22 19:42:45 +09:00
mir-opt Ignore wasm32 in test. 2021-10-17 16:35:04 +02:00
pretty Use ZST for fmt unsafety 2021-09-21 10:04:44 -05:00
run-make Rollup merge of #85833 - willcrichton:example-analyzer, r=jyn514 2021-10-23 14:58:39 +02:00
run-make-fulldeps Fix test 2021-10-25 15:15:05 +02:00
run-pass-valgrind
rustdoc Rollup merge of #90018 - GuillaumeGomez:too-long-item-names, r=jsha 2021-10-20 04:35:15 +09:00
rustdoc-gui Auto merge of #90186 - jsha:fix-header-sizes, r=GuillaumeGomez 2021-10-27 12:27:47 +00:00
rustdoc-js
rustdoc-js-std Fix linkcheck issues 2021-09-12 02:30:24 +00:00
rustdoc-json Add regression test for #89852 2021-10-14 02:12:18 +02:00
rustdoc-ui Rollup merge of #85833 - willcrichton:example-analyzer, r=jyn514 2021-10-23 14:58:39 +02:00
ui Auto merge of #90373 - tmiasko:union-qualification, r=oli-obk 2021-10-29 12:21:09 +00:00
ui-fulldeps Revert "Add rustc lint, warning when iterating over hashmaps" 2021-10-28 11:01:42 -04:00
COMPILER_TESTS.md