Skip to content

transpile: Use strict provenance APIs for pointer casts#1810

Merged
ahomescu merged 3 commits into
immunant:masterfrom
Rua:strict-provenance
Jun 24, 2026
Merged

transpile: Use strict provenance APIs for pointer casts#1810
ahomescu merged 3 commits into
immunant:masterfrom
Rua:strict-provenance

Conversation

@Rua

@Rua Rua commented May 16, 2026

Copy link
Copy Markdown
Contributor

The strict provenance APIs changed since the currently used nightly 1.67, so I've selected the API based on the edition, and left comments for when things were changed. Casts involving function pointers are not covered by this, as they use transmutes, and it doesn't seem immediately obvious how to make that work.

@Rua Rua force-pushed the strict-provenance branch 7 times, most recently from 2de95e0 to 2be7f24 Compare May 16, 2026 20:52
@Rua Rua force-pushed the strict-provenance branch 2 times, most recently from 29777a2 to dcaf8fe Compare May 16, 2026 21:20
@Rua Rua force-pushed the strict-provenance branch from dcaf8fe to 15ada11 Compare May 30, 2026 21:06
@Rua Rua marked this pull request as ready for review May 30, 2026 21:06
ahomescu added a commit that referenced this pull request Jun 11, 2026
Small bugfix for a problem that showed itself in CI with #1810.
@Rua Rua force-pushed the strict-provenance branch 2 times, most recently from 90a921c to 4c5a89c Compare June 11, 2026 10:24
@Rua Rua force-pushed the strict-provenance branch from 4c5a89c to 673697b Compare June 18, 2026 12:26
Comment thread c2rust-transpile/src/translator/pointers.rs
@Rua Rua force-pushed the strict-provenance branch from 673697b to 51976e0 Compare June 19, 2026 10:07
@ahomescu ahomescu merged commit 8b29087 into immunant:master Jun 24, 2026
11 checks passed
@Rua Rua deleted the strict-provenance branch June 25, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

better handle strict provenance when it's stabilized

2 participants