rust/src/tools
Matthias Krüger 8912318a4c
Rollup merge of #128720 - y21:issue119620, r=compiler-errors
Pass the right `ParamEnv` to `might_permit_raw_init_strict`

Fixes #119620

`might_permit_raw_init_strict` currently passes an empty `ParamEnv` to the `InterpCx`, instead of the actual `ParamEnv` that was passed in to `check_validity_requirement` at callsite.

This leads to ICEs such as the linked issue where for `UnsafeCell<*mut T>` we initially get the layout with the right `ParamEnv` (which suceeds because it can prove that `T: Sized` and therefore `UnsafeCell<*mut T>` has a known layout) but then do the rest with an empty `ParamEnv` where `T: Sized` is not known to hold so getting the layout for `*mut T` later fails.

This runs into an assertion in other layout code where it's making the (valid) assumption that, when we already have a layout for a struct (`UnsafeCell<*mut T>`), getting the layout of one of its fields (`*mut T`) should also succeed, which wasn't the case here due to using the wrong `ParamEnv`.

So, this PR changes it to just use the same `ParamEnv` all the way throughout.
2024-08-06 20:23:41 +02:00
..
build-manifest Promote riscv64gc-unknown-linux-musl to tier 2 2024-08-03 23:26:10 +01:00
build_helper Reformat use declarations. 2024-07-29 08:26:52 +10:00
bump-stage0 bump-stage0: use IndexMap for determinism 2024-07-30 15:13:58 -07:00
cargo@fa64658367 Update cargo 2024-08-02 20:36:03 -04:00
cargotest Reformat use declarations. 2024-07-29 08:26:52 +10:00
clippy pass the right ParamEnv to might_permit_raw_init_strict 2024-08-06 01:53:50 +02:00
collect-license-metadata Reformat use declarations. 2024-07-29 08:26:52 +10:00
compiletest Rollup merge of #128161 - EtomicBomb:just-compiletest, r=notriddle 2024-08-03 11:17:42 +02:00
coverage-dump Reformat use declarations. 2024-07-29 08:26:52 +10:00
error_index_generator Reformat use declarations. 2024-07-29 08:26:52 +10:00
generate-copyright Reformat use declarations. 2024-07-29 08:26:52 +10:00
generate-windows-sys Reformat use declarations. 2024-07-29 08:26:52 +10: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 skip src/tools/libcxx-version from tidy 2024-06-06 07:01:37 +03:00
linkchecker Reformat use declarations. 2024-07-29 08:26:52 +10:00
lint-docs Reformat use declarations. 2024-07-29 08:26:52 +10: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 #128707 - matthiaskrgr:rollup-63klywk, r=matthiaskrgr 2024-08-05 22:53:14 +00:00
miropt-test-tools tidy: wrap regexes with lazy_static 2024-02-17 12:29:05 +03:00
opt-dist Update sysinfo version to 0.31.2 2024-08-01 16:39:55 +02: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 rewrite cdylib-dylib-linkage to rmake 2024-08-05 10:39:17 -04:00
rust-analyzer when josh-proxy screws up the roundtrip, say what the involved commits are 2024-08-01 12:28:02 +02:00
rust-installer Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustbook Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc-perf@c64bb60dd1 Update rustc-perf submodule 2024-06-12 11:45:52 +02:00
rustc-perf-wrapper Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustdoc Change SIGPIPE ui from #[unix_sigpipe = "..."] to -Zon-broken-pipe=... 2024-05-02 19:48:29 +02:00
rustdoc-gui Other EcmaScript version bump 2024-06-07 08:44:52 +08:00
rustdoc-gui-test Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustdoc-js Other EcmaScript version bump 2024-06-07 08:44:52 +08:00
rustdoc-themes
rustfmt rustfmt: Remove has_cpuid from test 2024-08-02 02:12:29 -07:00
suggest-tests Reformat use declarations. 2024-07-29 08:26:52 +10:00
tidy rewrite cdylib-dylib-linkage to rmake 2024-08-05 10:39:17 -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 CI: fix toolstate publishing 2024-05-15 15:48:52 +02:00