rust/src/test
bors e82584a77d Auto merge of #75585 - RalfJung:demotion, r=oli-obk
Do not promote &mut of a non-ZST ever

Since ~pre-1.0~ 1.36, we have accepted code like this:
```rust
static mut TEST: &'static mut [i32] = {
    let x = &mut [1,2,3];
    x
};
```
I tracked it back to https://github.com/rust-lang/rust/pull/21744, but unfortunately could not find any discussion or RFC that would explain why we thought this was a good idea. And it's not, it breaks all sorts of things -- see https://github.com/rust-lang/rust/issues/75556.

To fix https://github.com/rust-lang/rust/issues/75556, we have to stop promoting non-ZST mutable references no matter the context, which is what this PR does. It's a breaking change.

Notice that this still works, since it does not rely on promotion:
```rust
static mut TEST: &'static mut [i32] = &mut [0,1,2];
```

Cc `@rust-lang/wg-const-eval`
2020-09-08 05:13:42 +00:00
..
assembly Fix test 2020-08-28 18:53:09 +01:00
auxiliary
codegen Add codegen tests 2020-08-31 08:19:15 +02:00
codegen-units ty: remove obsolete printer 2020-08-30 18:59:07 +01:00
compile-fail pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
debuginfo debuginfo: Ignore HashMap tests before cdb 10.0.18362.1 2020-09-05 14:47:16 -07:00
incremental pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
mir-opt Generalize to Eq(true, _place) and Eq(_place, true) 2020-09-06 11:51:44 +02:00
pretty pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
run-make
run-make-fulldeps Ignore failing PGO/coverage tests on MinGW 2020-09-05 12:31:16 +02:00
run-pass-valgrind
rustdoc Rollup merge of #76082 - jyn514:top-level-links, r=ollie27,GuillaumeGomez 2020-09-05 16:28:28 +02:00
rustdoc-js
rustdoc-js-std
rustdoc-ui Add test for doc alias on associated const in trait impls 2020-09-03 22:11:29 +02:00
rustfix
ui Auto merge of #75585 - RalfJung:demotion, r=oli-obk 2020-09-08 05:13:42 +00:00
ui-fulldeps Auto merge of #75138 - jumbatm:session-diagnostic-derive, r=oli-obk 2020-09-08 00:58:43 +00:00
COMPILER_TESTS.md