Skip to content

Check that arguments are only moving locals or box contents in the mir verifier #103362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bjorn3 opened this issue Oct 21, 2022 · 4 comments
Open
Labels
-Zvalidate-mir Unstable option: MIR validation A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html F-unsized_fn_params `#![feature(unsized_fn_params)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@bjorn3
Copy link
Member

bjorn3 commented Oct 21, 2022

See https://rust-lang.zulipchat.com/#narrow/stream/136281-t-lang.2Fwg-unsafe-code-guidelines/topic/stack.20slot.20reuse.20Q/near/305406997 for more context.

@bjorn3 bjorn3 added A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html F-unsized_fn_params `#![feature(unsized_fn_params)]` -Zvalidate-mir Unstable option: MIR validation labels Oct 21, 2022
@bjorn3 bjorn3 changed the title Check that unsized arguments are only moving locals or box contents in the mir verifier Check that arguments are only moving locals or box contents in the mir verifier Oct 21, 2022
@RalfJung
Copy link
Member

You tagged this unsized-fn-params, but the check should apply to all move arguments, right? The relation to unsized-fn-params is that those must always be move?

@bjorn3
Copy link
Member Author

bjorn3 commented Oct 21, 2022

Yeah, that is why I changed the issue title.

@bjorn3
Copy link
Member Author

bjorn3 commented Oct 21, 2022

You were talking about the label? I tagged it because I assume that clarifying these semantics is a blocker for stabilizing unsized_fn_params if we ever want to stabilize it.

@RalfJung
Copy link
Member

Looking at the existing verifier, the call destination probably needs the same treatment.

@Noratrieb Noratrieb added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Zvalidate-mir Unstable option: MIR validation A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html F-unsized_fn_params `#![feature(unsized_fn_params)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants