rust/src/tools
bors 7f4b270aa4 Auto merge of #129313 - RalfJung:coroutine-niches, r=compiler-errors
Supress niches in coroutines to avoid aliasing violations

As mentioned [here](https://github.com/rust-lang/rust/issues/63818#issuecomment-2264915918), using niches in fields of coroutines that are referenced by other fields is unsound: the discriminant accesses violate the aliasing requirements of the reference pointing to the relevant field. This issue causes [Miri errors in practice](https://github.com/rust-lang/miri/issues/3780).

The "obvious" fix for this is to suppress niches in coroutines. That's what this PR does. However, we have several tests explicitly ensuring that we *do* use niches in coroutines. So I see two options:
- We guard this behavior behind a `-Z` flag (that Miri will set by default). There is no known case of these aliasing violations causing miscompilations. But absence of evidence is not evidence of absence...
- (What this PR does right now.) We temporarily adjust the coroutine layout logic and the associated tests until the proper fix lands. The "proper fix" here is to wrap fields that other fields can point to in [`UnsafePinned`](https://github.com/rust-lang/rust/issues/125735) and make `UnsafePinned` suppress niches; that would then still permit using niches of *other* fields (those that never get borrowed). However, I know that coroutine sizes are already a problem, so I am not sure if this temporary size regression is acceptable.

`@compiler-errors` any opinion? Also who else should be Cc'd here?
2024-09-08 03:11:12 +00:00
..
build-manifest Promote Mac Catalyst targets to tier 2, and ship with rustup 2024-08-14 02:12:14 +02:00
build_helper warn the user if the upstream master branch is old 2024-08-27 15:30:17 -04:00
bump-stage0 bump-stage0: use IndexMap for determinism 2024-07-30 15:13:58 -07:00
cargo@c1fa840a85 Update cargo 2024-08-31 09:30:22 +08:00
cargotest Reformat use declarations. 2024-07-29 08:26:52 +10:00
clippy Rollup merge of #129555 - RalfJung:const_float_bits_conv, r=dtolnay 2024-09-07 23:30:11 +02:00
collect-license-metadata Update generate-copyright 2024-08-06 11:04:55 +01:00
compiletest Rollup merge of #101339 - the8472:ci-randomize-debug, r=Mark-Simulacrum 2024-09-05 03:47:39 +02:00
coverage-dump Reformat use declarations. 2024-07-29 08:26:52 +10:00
enzyme@2fe5164a24 Enzyme backend 2024-09-05 22:47:23 -04:00
error_index_generator Reformat use declarations. 2024-07-29 08:26:52 +10:00
generate-copyright Apparently library/std is now part of a workspace at library/ 2024-08-06 12:12:57 +01:00
generate-windows-sys Add windows-targets crate to std's sysroot 2024-08-09 10:43:43 +00:00
html-checker Reformat use declarations. 2024-07-29 08:26:52 +10:00
jsondocck Reformat use declarations. 2024-07-29 08:26:52 +10:00
jsondoclint rustdoc: Remove OpaqueTy 2024-08-01 15:57:45 +00:00
libcxx-version
linkchecker update the doc comment on lintchecker b/c it parses html now 2024-08-24 12:35:35 -04:00
lint-docs forward linker option to lint-docs 2024-09-04 14:44:23 +08:00
lld-wrapper Reformat use declarations. 2024-07-29 08:26:52 +10:00
llvm-bitcode-linker Reformat use declarations. 2024-07-29 08:26:52 +10:00
miri Auto merge of #129313 - RalfJung:coroutine-niches, r=compiler-errors 2024-09-08 03:11:12 +00:00
miropt-test-tools
opt-dist set BOOTSTRAP_SKIP_TARGET_SANITY in opt-dist before running tests 2024-08-27 12:19:05 +03:00
remote-test-client Reformat use declarations. 2024-07-29 08:26:52 +10:00
remote-test-server Reformat use declarations. 2024-07-29 08:26:52 +10:00
replace-version-placeholder Reformat use declarations. 2024-07-29 08:26:52 +10:00
rls Reformat use declarations. 2024-07-29 08:26:52 +10:00
run-make-support run_make_support: make each command invocation only-run-once 2024-09-05 09:14:08 +00:00
rust-analyzer Fix tools 2024-09-06 10:32:48 -04:00
rust-installer Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustbook Update src/tools/rustbook/Cargo.lock 2024-08-26 10:12:50 -07:00
rustc-perf@d5055e7804 bump up rustc-perf's version 2024-08-09 01:24:39 +09:00
rustc-perf-wrapper impl compare command and benchmark command to rustc-perf-wrapper 2024-08-09 20:03:14 +09:00
rustdoc Link std statically in rustc_driver 2024-08-11 04:16:53 +02:00
rustdoc-gui
rustdoc-gui-test Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustdoc-js Separate core search logic with search ui 2024-08-29 00:26:16 +08:00
rustdoc-themes
rustfmt Fix tools 2024-09-06 10:32:48 -04:00
suggest-tests Reformat use declarations. 2024-07-29 08:26:52 +10:00
tidy Enzyme backend 2024-09-05 22:47:23 -04:00
tier-check Add NuttX based targets for RISC-V and ARM 2024-07-19 22:00:42 +08:00
unicode-table-generator Reformat use declarations. 2024-07-29 08:26:52 +10:00
unstable-book-gen Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-component-ld Promote the wasm32-wasip2 target to Tier 2 2024-07-09 12:11:08 -07:00
x Reformat use declarations. 2024-07-29 08:26:52 +10:00
cherry-pick.sh
publish_toolstate.py