rust/src/tools
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
..
build-manifest Add an armv8r-none-eabihf target to support the Cortex-R52. 2024-02-04 16:27:54 -08:00
build_helper rename github_repository to git_repository 2023-11-06 15:53:32 +01:00
bump-stage0 make x.py clippy download and use beta clippy 2023-12-16 15:24:59 -05:00
cargo@fc1d58fd05 Update cargo 2024-02-09 20:50:39 -05:00
cargotest Don't ask for a specific branch in cargotest 2023-12-04 12:11:44 +02:00
clippy Bump indexmap 2024-02-13 21:03:34 +00:00
collect-license-metadata Fix generate-copyright tool. 2023-11-27 11:03:53 +00:00
compiletest Rollup merge of #120273 - klensy:ct-run, r=onur-ozkan 2024-02-12 23:18:53 +01:00
coverage-dump Step all bootstrap cfgs forward 2024-02-08 07:44:34 -05:00
error_index_generator Stop using String for error codes. 2024-01-29 07:41:41 +11:00
expand-yaml-anchors
generate-copyright Fix generate-copyright tool. 2023-11-27 11:03:53 +00:00
generate-windows-sys Automatically sort windows_sys bindings 2024-02-14 06:49:39 -03:00
html-checker
jsondocck jsondocck: bump jsonpath to 0.3, dropping few dup dependencies 2023-11-18 12:56:54 +03:00
jsondoclint rustdoc: Rename typedef to type alias in jsondoclint 2023-08-23 11:47:35 -07:00
linkchecker Switch linkchecker to use html5ever for html parsing. 2024-02-08 14:23:40 -08:00
lint-docs Update test for E0796 and static_mut_ref lint 2024-01-07 17:29:25 +03:00
lld-wrapper linker: Remove -Zgcc-ld option 2023-10-08 10:05:25 +03:00
miri Split a bool argument into two named functions 2024-02-15 10:25:18 +00:00
miropt-test-tools Don't allow .html files in tests/mir-opt/ 2024-01-16 17:48:31 +11:00
opt-dist Partial Revert: "Auto merge of #117018 - Kobzol:opt-dist-cargo-stage0" 2023-10-23 16:10:52 +02:00
remote-test-client use u64 to represent file size 2024-01-21 18:16:22 +03:00
remote-test-server use u64 to represent file size 2024-01-21 18:16:22 +03:00
replace-version-placeholder
rls
rust-analyzer Tweak delayed bug mentions. 2024-02-12 18:39:20 +11:00
rust-demangler
rust-installer use /usr/bin/env bash instead of /bin/bash 2024-01-21 12:43:09 -05:00
rustbook Update mdbook to 0.4.37 2024-02-06 20:22:13 -08:00
rustdoc
rustdoc-gui Improve display of parallel jobs in rustdoc-gui tester script 2023-10-16 20:16:08 +02:00
rustdoc-gui-test
rustdoc-js rustdoc-search: remove parallel searchWords array 2023-12-15 16:26:35 -07:00
rustdoc-themes Ensure build/tmp exists in rustdoc_themes::get_themes 2023-09-20 08:31:33 +02:00
rustfmt Rollup merge of #121035 - compiler-errors:rustfmt-asyncness, r=calebcartwright 2024-02-14 15:41:27 +01:00
suggest-tests Suggest pattern tests when modifying exhaustiveness 2024-02-08 01:51:12 +01:00
tidy Rollup merge of #120893 - c410-f3r:testsssssss, r=petrochenkov 2024-02-14 15:41:26 +01:00
tier-check
unicode-table-generator
unstable-book-gen
x
cherry-pick.sh
publish_toolstate.py