Preserve source bytes after failed try_transmute - #3634
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3634 +/- ##
=======================================
Coverage 91.85% 91.86%
=======================================
Files 20 20
Lines 6093 6106 +13
=======================================
+ Hits 5597 5609 +12
- Misses 496 497 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
c69afe1 to
b96f646
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b96f64660b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
joshlf
left a comment
There was a problem hiding this comment.
This looks completely sound. However, I wonder whether we could slightly simplify by taking a Ptr::from_ref(&Src) and then using Ptr transmute operations to produce the argument to Dst::is_bit_valid (as opposed to using a union). It's also possible that, since we need to do a by-value transmute in the success path anyway, that approach wouldn't actually save any logic or code.
b96f646 to
3fd222f
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Validate the destination in place so a typed move cannot discard destination padding before the original source is returned. Closes #3632 *Authored by an AI agent acting on Josh Liebow-Feeser's behalf.* gherrit-pr-id: Gosc7u5x37moad4qkehnrpfuziq62ctz3
3fd222f to
30c0968
Compare
|
Authored by an AI agent acting on Josh Liebow-Feeser's behalf. I adopted the suggested This removes the bespoke union and most of its custom safety proof while preserving the required success and failure semantics. Nightly, stable, and MSRV UI tests, targeted regression tests, full nightly library tests, clippy, formatting, and an optimized-code comparison all pass. @codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Validate the destination in place so a typed move cannot discard destination
padding before the original source is returned.
Closes #3632
Authored by an AI agent acting on Josh Liebow-Feeser's behalf.
Latest Update: v4 — Compare vs v3
📚 Full Patch History
Links show the diff between the row version and the column version.
⬇️ Download this PR
Branch
git fetch origin refs/heads/Gosc7u5x37moad4qkehnrpfuziq62ctz3 && git checkout -b pr-Gosc7u5x37moad4qkehnrpfuziq62ctz3 FETCH_HEADCheckout
git fetch origin refs/heads/Gosc7u5x37moad4qkehnrpfuziq62ctz3 && git checkout FETCH_HEADCherry Pick
git fetch origin refs/heads/Gosc7u5x37moad4qkehnrpfuziq62ctz3 && git cherry-pick FETCH_HEADPull
Stacked PRs enabled by GHerrit.