mir: validate Move call arguments are locals or box derefs - #160651
mir: validate Move call arguments are locals or box derefs#160651rabindra789 wants to merge 1 commit into
Move call arguments are locals or box derefs#160651Conversation
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
|
r? @mati865 rustbot has assigned @mati865. Use Why was this reviewer chosen?The reviewer was selected based on:
|
6cf4605 to
1154159
Compare
|
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
…call-args, r=WaffleLapkin mir: validate `Move` call arguments are locals or box derefs Fixes rust-lang#103362. This PR adds a MIR validation check for `Move` arguments passed to `Call` and `TailCall` terminators. A moved argument should be either a local or the contents of the `Box`. Other places can deinitialize memory that codegen does not track correctly. The check is only enabled with `-Zvalidate-mir`, using the same phase restriction as the existing `Copy` check. Added a regression test covering the invalid case.
…uwer Rollup of 4 pull requests Successful merges: - #160651 (mir: validate `Move` call arguments are locals or box derefs) - #161736 (Tidy: show todo reason when lint fails (and fix the lint's tidy allow statement which was weird and broken...)) - #161052 (Add regression test for generic inference) - #161818 (Fix long type on diagnostics for conditionally implemented traits)
This comment has been minimized.
This comment has been minimized.
…r=WaffleLapkin mir: validate `Move` call arguments are locals or box derefs Fixes #103362. This PR adds a MIR validation check for `Move` arguments passed to `Call` and `TailCall` terminators. A moved argument should be either a local or the contents of the `Box`. Other places can deinitialize memory that codegen does not track correctly. The check is only enabled with `-Zvalidate-mir`, using the same phase restriction as the existing `Copy` check. Added a regression test covering the invalid case.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@rustbot review |
|
@bors try jobs=x86_64-gnu-tools |
This comment has been minimized.
This comment has been minimized.
…r=<try> mir: validate `Move` call arguments are locals or box derefs try-job: x86_64-gnu-tools
There was a problem hiding this comment.
@bors r+
looks like the rollup failure was unrelated to this PR... fun.
…call-args, r=WaffleLapkin mir: validate `Move` call arguments are locals or box derefs Fixes rust-lang#103362. This PR adds a MIR validation check for `Move` arguments passed to `Call` and `TailCall` terminators. A moved argument should be either a local or the contents of the `Box`. Other places can deinitialize memory that codegen does not track correctly. The check is only enabled with `-Zvalidate-mir`, using the same phase restriction as the existing `Copy` check. Added a regression test covering the invalid case.
…call-args, r=WaffleLapkin mir: validate `Move` call arguments are locals or box derefs Fixes rust-lang#103362. This PR adds a MIR validation check for `Move` arguments passed to `Call` and `TailCall` terminators. A moved argument should be either a local or the contents of the `Box`. Other places can deinitialize memory that codegen does not track correctly. The check is only enabled with `-Zvalidate-mir`, using the same phase restriction as the existing `Copy` check. Added a regression test covering the invalid case.
…uwer Rollup of 8 pull requests Successful merges: - #160505 (delegation: supporting inherent impls) - #160651 (mir: validate `Move` call arguments are locals or box derefs) - #161806 (Add tests and docs for `#[derive(GenericTypeVisitable)]`) - #161912 (run `extern "tail"` with `byval` argument test) - #162435 (windows-gnu: document libgcc requirement) - #162439 (Update books) - #162459 (docs(time): replace "method" with "function") - #162465 (Fix my duplicate thanks entry)
…uwer Rollup of 8 pull requests Successful merges: - #160505 (delegation: supporting inherent impls) - #160651 (mir: validate `Move` call arguments are locals or box derefs) - #161806 (Add tests and docs for `#[derive(GenericTypeVisitable)]`) - #161912 (run `extern "tail"` with `byval` argument test) - #162435 (windows-gnu: document libgcc requirement) - #162439 (Update books) - #162459 (docs(time): replace "method" with "function") - #162465 (Fix my duplicate thanks entry)
…call-args, r=WaffleLapkin mir: validate `Move` call arguments are locals or box derefs Fixes rust-lang#103362. This PR adds a MIR validation check for `Move` arguments passed to `Call` and `TailCall` terminators. A moved argument should be either a local or the contents of the `Box`. Other places can deinitialize memory that codegen does not track correctly. The check is only enabled with `-Zvalidate-mir`, using the same phase restriction as the existing `Copy` check. Added a regression test covering the invalid case.
…uwer Rollup of 10 pull requests Successful merges: - #162470 (Subtree sync for rustc_codegen_cranelift) - #160505 (delegation: supporting inherent impls) - #160651 (mir: validate `Move` call arguments are locals or box derefs) - #161806 (Add tests and docs for `#[derive(GenericTypeVisitable)]`) - #161912 (run `extern "tail"` with `byval` argument test) - #162435 (windows-gnu: document libgcc requirement) - #162439 (Update books) - #162451 (Add regression test for item-local diagnostic attribute lint levels) - #162459 (docs(time): replace "method" with "function") - #162465 (Fix my duplicate thanks entry)
…call-args, r=WaffleLapkin mir: validate `Move` call arguments are locals or box derefs Fixes rust-lang#103362. This PR adds a MIR validation check for `Move` arguments passed to `Call` and `TailCall` terminators. A moved argument should be either a local or the contents of the `Box`. Other places can deinitialize memory that codegen does not track correctly. The check is only enabled with `-Zvalidate-mir`, using the same phase restriction as the existing `Copy` check. Added a regression test covering the invalid case.
…uwer Rollup of 9 pull requests Successful merges: - #160505 (delegation: supporting inherent impls) - #160651 (mir: validate `Move` call arguments are locals or box derefs) - #161806 (Add tests and docs for `#[derive(GenericTypeVisitable)]`) - #161912 (run `extern "tail"` with `byval` argument test) - #162435 (windows-gnu: document libgcc requirement) - #162439 (Update books) - #162451 (Add regression test for item-local diagnostic attribute lint levels) - #162459 (docs(time): replace "method" with "function") - #162465 (Fix my duplicate thanks entry)
|
The bors config at |
…uwer Rollup of 9 pull requests Successful merges: - #160505 (delegation: supporting inherent impls) - #160651 (mir: validate `Move` call arguments are locals or box derefs) - #161806 (Add tests and docs for `#[derive(GenericTypeVisitable)]`) - #161912 (run `extern "tail"` with `byval` argument test) - #162435 (windows-gnu: document libgcc requirement) - #162439 (Update books) - #162451 (Add regression test for item-local diagnostic attribute lint levels) - #162459 (docs(time): replace "method" with "function") - #162465 (Fix my duplicate thanks entry)
|
Asked about the above error at https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Invalid.20rust-bors.2Etoml.20error/with/622534709 |
View all comments
Fixes #103362.
This PR adds a MIR validation check for
Movearguments passed toCallandTailCallterminators.A moved argument should be either a local or the contents of the
Box. Other places can deinitialize memory that codegen does not track correctly. The check is only enabled with-Zvalidate-mir, using the same phase restriction as the existingCopycheck.Added a regression test covering the invalid case.