interpret: fix overlapping aggregate initialization by RalfJung · Pull Request #146402 · rust-lang/rust

@rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Sep 10, 2025

@RalfJung

and double-check that we match it in codegen

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Sep 14, 2025

bors added a commit that referenced this pull request

Sep 14, 2025
interpret: fix overlapping aggregate initialization

This fixes the problem pointed out by `@saethlin` in #146383 (comment).

Also clarify when exactly current de-facto MIR semantics allow overlap of the LHS and RHS in an assignment.

@bors bors added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

and removed S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

labels

Sep 14, 2025

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Sep 14, 2025

Zalathar added a commit to Zalathar/rust that referenced this pull request

Sep 15, 2025
interpret: fix overlapping aggregate initialization

This fixes the problem pointed out by `@saethlin` in rust-lang#146383 (comment).

Also clarify when exactly current de-facto MIR semantics allow overlap of the LHS and RHS in an assignment.

bors added a commit that referenced this pull request

Sep 15, 2025
Rollup of 8 pull requests

Successful merges:

 - #146402 (interpret: fix overlapping aggregate initialization)
 - #146530 (rustc_codegen_llvm: Adjust RISC-V inline assembly's clobber list)
 - #146533 (Note some previous attempts to change the Default impl for `[T; 0]`)
 - #146539 (fix 404 MCP link)
 - #146546 (Switch `std::vec::PeekMut::pop` from self to this parameter.)
 - #146549 (On FreeBSD, use readdir instead of readdir_r)
 - #146559 (Fix typo in error message)
 - #146563 (bootstrap.py: disable incremental build for bootstrap in CI)

r? `@ghost`
`@rustbot` modify labels: rollup

bors added a commit that referenced this pull request

Sep 15, 2025
Rollup of 8 pull requests

Successful merges:

 - #146402 (interpret: fix overlapping aggregate initialization)
 - #146530 (rustc_codegen_llvm: Adjust RISC-V inline assembly's clobber list)
 - #146533 (Note some previous attempts to change the Default impl for `[T; 0]`)
 - #146539 (fix 404 MCP link)
 - #146546 (Switch `std::vec::PeekMut::pop` from self to this parameter.)
 - #146549 (On FreeBSD, use readdir instead of readdir_r)
 - #146559 (Fix typo in error message)
 - #146563 (bootstrap.py: disable incremental build for bootstrap in CI)

r? `@ghost`
`@rustbot` modify labels: rollup

bors added a commit that referenced this pull request

Sep 15, 2025
Rollup of 8 pull requests

Successful merges:

 - #146402 (interpret: fix overlapping aggregate initialization)
 - #146530 (rustc_codegen_llvm: Adjust RISC-V inline assembly's clobber list)
 - #146533 (Note some previous attempts to change the Default impl for `[T; 0]`)
 - #146539 (fix 404 MCP link)
 - #146546 (Switch `std::vec::PeekMut::pop` from self to this parameter.)
 - #146549 (On FreeBSD, use readdir instead of readdir_r)
 - #146559 (Fix typo in error message)
 - #146563 (bootstrap.py: disable incremental build for bootstrap in CI)

r? `@ghost`
`@rustbot` modify labels: rollup

Zalathar added a commit to Zalathar/rust that referenced this pull request

Sep 15, 2025
interpret: fix overlapping aggregate initialization

This fixes the problem pointed out by ``@saethlin`` in rust-lang#146383 (comment).

Also clarify when exactly current de-facto MIR semantics allow overlap of the LHS and RHS in an assignment.

Zalathar added a commit to Zalathar/rust that referenced this pull request

Sep 15, 2025
interpret: fix overlapping aggregate initialization

This fixes the problem pointed out by ```@saethlin``` in rust-lang#146383 (comment).

Also clarify when exactly current de-facto MIR semantics allow overlap of the LHS and RHS in an assignment.

bors added a commit that referenced this pull request

Sep 15, 2025
Rollup of 12 pull requests

Successful merges:

 - #146338 (Extends AArch64 branch protection support to include GCS)
 - #146344 (tests/codegen-llvm: Make rust-abi-arch-specific-adjustment portable)
 - #146402 (interpret: fix overlapping aggregate initialization)
 - #146405 (Add relnotes for 1.90.0)
 - #146530 (rustc_codegen_llvm: Adjust RISC-V inline assembly's clobber list)
 - #146533 (Note some previous attempts to change the Default impl for `[T; 0]`)
 - #146539 (fix 404 MCP link)
 - #146546 (Switch `std::vec::PeekMut::pop` from self to this parameter.)
 - #146549 (On FreeBSD, use readdir instead of readdir_r)
 - #146559 (Fix typo in error message)
 - #146563 (bootstrap.py: disable incremental build for bootstrap in CI)
 - #146576 (opt-dist: don't set `RUST_LOG=collector=debug`)

r? `@ghost`
`@rustbot` modify labels: rollup

bors added a commit that referenced this pull request

Sep 16, 2025
Rollup of 9 pull requests

Successful merges:

 - #145095 (Migrate `UnsizedConstParamTy`  to unstable impl of `ConstParamTy_`)
 - #145960 (Split `FnCtxt::report_args_error` into subfunctions)
 - #146402 (interpret: fix overlapping aggregate initialization)
 - #146466 (llvm-wrapper: other cleanup)
 - #146574 (compiletest: Enable new-output-capture by default)
 - #146599 (replace some `#[const_trait]` with `const trait`)
 - #146601 (compiletest: Make `./x test --test-args ...` work again)
 - #146608 (improve internal bootstrap docs)
 - #146609 (bootstrap: lower verbosity of cargo to one less than bootstrap's)

r? `@ghost`
`@rustbot` modify labels: rollup

bors added a commit that referenced this pull request

Sep 16, 2025
interpret: fix overlapping aggregate initialization

This fixes the problem pointed out by `@saethlin` in #146383 (comment).

Also clarify when exactly current de-facto MIR semantics allow overlap of the LHS and RHS in an assignment.

bors added a commit that referenced this pull request

Sep 16, 2025
Rollup of 9 pull requests

Successful merges:

 - #145095 (Migrate `UnsizedConstParamTy`  to unstable impl of `ConstParamTy_`)
 - #145960 (Split `FnCtxt::report_args_error` into subfunctions)
 - #146402 (interpret: fix overlapping aggregate initialization)
 - #146466 (llvm-wrapper: other cleanup)
 - #146574 (compiletest: Enable new-output-capture by default)
 - #146599 (replace some `#[const_trait]` with `const trait`)
 - #146601 (compiletest: Make `./x test --test-args ...` work again)
 - #146608 (improve internal bootstrap docs)
 - #146609 (bootstrap: lower verbosity of cargo to one less than bootstrap's)

r? `@ghost`
`@rustbot` modify labels: rollup

rust-timer added a commit that referenced this pull request

Sep 16, 2025
Rollup merge of #146402 - RalfJung:aggregate-init, r=saethlin

interpret: fix overlapping aggregate initialization

This fixes the problem pointed out by ````@saethlin```` in #146383 (comment).

Also clarify when exactly current de-facto MIR semantics allow overlap of the LHS and RHS in an assignment.

github-actions bot pushed a commit to rust-lang/miri that referenced this pull request

Sep 17, 2025

github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request

Oct 9, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang#145095 (Migrate `UnsizedConstParamTy`  to unstable impl of `ConstParamTy_`)
 - rust-lang#145960 (Split `FnCtxt::report_args_error` into subfunctions)
 - rust-lang#146402 (interpret: fix overlapping aggregate initialization)
 - rust-lang#146466 (llvm-wrapper: other cleanup)
 - rust-lang#146574 (compiletest: Enable new-output-capture by default)
 - rust-lang#146599 (replace some `#[const_trait]` with `const trait`)
 - rust-lang#146601 (compiletest: Make `./x test --test-args ...` work again)
 - rust-lang#146608 (improve internal bootstrap docs)
 - rust-lang#146609 (bootstrap: lower verbosity of cargo to one less than bootstrap's)

r? `@ghost`
`@rustbot` modify labels: rollup