rust/tests
bors 6a4222b511 Auto merge of #116564 - oli-obk:evaluated_static_in_metadata, r=RalfJung,cjgillot
Store static initializers in metadata instead of the MIR of statics.

This means that adding generic statics would be even more difficult, as we can't evaluate statics from other crates anymore, but the subtle issue I have encountered make me think that having this be an explicit problem is better.

The issue is that

```rust
static mut FOO: &mut u32 = &mut 42;
static mut BAR = unsafe { FOO };
```

gets different allocations, instead of referring to the same one. This is also true for non-static mut, but promotion makes `static FOO: &u32 = &42;` annoying to demo.

Fixes https://github.com/rust-lang/rust/issues/61345

## Why is this being done?

In order to ensure all crates see the same nested allocations (which is the last issue that needs fixing before we can stabilize [`const_mut_refs`](https://github.com/rust-lang/rust/issues/57349)), I am working on creating anonymous (from the Rust side, to LLVM it's like a regular static item) static items for the nested allocations in a static. If we evaluate the static item in a downstream crate again, we will end up duplicating its nested allocations (and in some cases, like the `match` case, even duplicate the main allocation).
2024-02-15 10:28:31 +00:00
..
assembly Bless/fix tests 2024-02-08 19:56:30 -05:00
auxiliary
codegen tests: LLVM 18 infers an extra noalias here 2024-02-13 10:33:40 +01:00
codegen-units Update tests 2024-02-07 10:42:01 +08:00
coverage Enable by default. 2024-02-09 21:13:51 +00:00
coverage-run-rustdoc coverage: Don't instrument #[automatically_derived] functions 2024-01-22 12:18:57 +11:00
debuginfo Update tests. 2024-01-27 16:38:57 +01:00
incremental Auto merge of #120919 - oli-obk:impl_polarity, r=compiler-errors 2024-02-13 02:48:49 +00:00
mir-opt Rollup merge of #121039 - cjgillot:gvn-adjust, r=compiler-errors 2024-02-14 11:53:41 +01:00
pretty Auto merge of #120227 - nnethercote:further-improve-space_between, r=petrochenkov 2024-01-31 02:01:43 +00:00
run-make Update data layouts in custom target tests for LLVM 18 2024-01-31 15:15:59 +01:00
run-make-fulldeps
run-pass-valgrind
rustdoc Rollup merge of #121022 - fmease:rustdoc-x-crate-late-bound-lt-src-order, r=GuillaumeGomez 2024-02-15 09:20:18 +01:00
rustdoc-gui Rollup merge of #119746 - notriddle:notriddle/resize-close-modals, r=fmease 2024-01-22 07:56:42 +01:00
rustdoc-js
rustdoc-js-std
rustdoc-json
rustdoc-ui Clean inlined type alias with correct param-env 2024-02-12 04:51:49 +00:00
ui Auto merge of #116564 - oli-obk:evaluated_static_in_metadata, r=RalfJung,cjgillot 2024-02-15 10:28:31 +00:00
ui-fulldeps Rollup merge of #120982 - momvart:smir-61-foreign_kind, r=oli-obk 2024-02-15 09:20:18 +01:00
COMPILER_TESTS.md