Skip to content
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

layout.might_permit_raw_init supports additional checks #1273

Closed
tedinski opened this issue Jun 10, 2022 · 1 comment
Closed

layout.might_permit_raw_init supports additional checks #1273

tedinski opened this issue Jun 10, 2022 · 1 comment
Assignees

Comments

@tedinski
Copy link
Contributor

Rust's layout.might_permit_raw_init went from taking true/false flag to taking:

  1. InitKind::Zero, * which corresponds to the old true (and the intrinsic assert_zero_valid)
  2. InitKind::Uninit, false which corresponds to the old false (and the instrinsic assert_uninit_valid)
  3. InitKind::Uninit, false which adds an additional strict check. Unclear if we want it for something.

Upstream PR: rust-lang/rust#97323

@adpaco-aws
Copy link
Contributor

In the most recent update, Rust provides two methods permits_zero_init and permits_uninit_init for the type context (where layout is the argument) instead of the method might_permit_raw_init for layouts.

The updates to the intrinsics code in #1399 make use of them (as in the ssa and cranelift backends), so there's nothing else to do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Status: Done
Status: Done
Development

No branches or pull requests

2 participants