Skip to content

Conversation

@joshlf
Copy link
Member

@joshlf joshlf commented Jan 8, 2026

Makes progress on #5
Closes #1831
Closes #1832


Latest Update: v54 — Compare vs v53

📚 Full Patch History

Links show the diff between the row version and the column version.

Version v53 v52 v51 v50 v49 v48 v47 v46 v45 v44 v43 v42 v41 v40 v39 v38 v37 v36 v35 v34 v33 v32 v31 v30 v29 v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v54 v53 v52 v51 v50 v49 v48 v47 v46 v45 v44 v43 v42 v41 v40 v39 v38 v37 v36 v35 v34 v33 v32 v31 v30 v29 v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v53 v52 Base
v52 v51 Base
v51 v50 Base
v50 v49 Base
v49 v48 Base
v48 v47 Base
v47 v46 Base
v46 v45 Base
v45 v44 Base
v44 v43 Base
v43 v42 Base
v42 v41 Base
v41 v40 Base
v40 v39 Base
v39 v38 Base
v38 v37 Base
v37 v36 Base
v36 v35 Base
v35 v34 Base
v34 v33 Base
v33 v32 Base
v32 v31 Base
v31 v30 Base
v30 v29 Base
v29 v28 Base
v28 v27 Base
v27 v26 Base
v26 v25 Base
v25 v24 Base
v24 v23 Base
v23 v22 Base
v22 v21 Base
v21 v20 Base
v20 v19 Base
v19 v18 Base
v18 v17 Base
v17 v16 Base
v16 v15 Base
v15 v14 Base
v14 v13 Base
v13 v12 Base
v12 v11 Base
v11 v10 Base
v10 v9 Base
v9 v8 Base
v8 v7 Base
v7 v6 Base
v6 v5 Base
v5 v4 Base
v4 v3 Base
v3 v2 Base
v2 v1 Base
v1 Base

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @joshlf, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the flexibility of the zerocopy crate by removing the Immutable trait requirement for deriving TryFromBytes, FromZeros, and FromBytes for unions. This change allows unions containing types like UnsafeCell, which are not inherently Immutable, to correctly implement these traits, broadening the utility of the derive macros without compromising memory safety.

Highlights

  • Removed Immutable Trait Bound for Unions: The Immutable trait bound has been removed for TryFromBytes, FromZeros, and FromBytes derives on unions, allowing these derives to be used with unions containing non-Immutable types.
  • Updated Safety Justification: The safety comment for TryFromBytes on unions has been updated to clarify that safety is ensured by ReadOnly<Self>: Immutable, which holds unconditionally, rather than Self: Immutable.
  • New Test Cases for UnsafeCell Unions: New test cases have been added for unions containing UnsafeCell to validate the updated derive behavior for FromBytes, FromZeros, and TryFromBytes.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly removes the Immutable bound requirement for fields of unions when deriving TryFromBytes, FromZeros, and FromBytes. This is a significant improvement that allows unions containing types with interior mutability (like UnsafeCell) to use these derives. The implementation ensures safety by using a ReadOnly wrapper during validity checks, and the corresponding safety comments are updated accordingly. The change is supported by new tests that verify the new functionality. The implementation is sound and the code quality is high.

@joshlf joshlf force-pushed the G0d92654de6e9a8c16ac830e35adf298a1b486df4 branch from 21a1122 to b220dc0 Compare January 8, 2026 19:34
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch from 2563db5 to 933a997 Compare January 8, 2026 19:34
@joshlf joshlf force-pushed the G0d92654de6e9a8c16ac830e35adf298a1b486df4 branch from b220dc0 to e7e1674 Compare January 8, 2026 19:40
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch 2 times, most recently from b886722 to fe1e718 Compare January 8, 2026 19:50
@joshlf joshlf force-pushed the G0d92654de6e9a8c16ac830e35adf298a1b486df4 branch from e7e1674 to 6321cc7 Compare January 8, 2026 19:50
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.82%. Comparing base (d2d392a) to head (619328b).

Additional details and impacted files
@@                              Coverage Diff                              @@
##           G7691845b6b02e9f3d9578435d732bacfa6ca674f    #2876      +/-   ##
=============================================================================
- Coverage                                      91.93%   90.82%   -1.12%     
=============================================================================
  Files                                             19       20       +1     
  Lines                                           5856     5928      +72     
=============================================================================
  Hits                                            5384     5384              
- Misses                                           472      544      +72     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joshlf joshlf force-pushed the G0d92654de6e9a8c16ac830e35adf298a1b486df4 branch from 6321cc7 to dd15299 Compare January 9, 2026 00:00
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch from fe1e718 to 050ea06 Compare January 9, 2026 00:00
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch from 050ea06 to 2972d07 Compare January 9, 2026 16:57
@joshlf joshlf changed the base branch from G0d92654de6e9a8c16ac830e35adf298a1b486df4 to G7691845b6b02e9f3d9578435d732bacfa6ca674f January 9, 2026 16:57
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch from 5cf70a2 to e6fab2d Compare January 9, 2026 17:04
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch from 2972d07 to f5919bc Compare January 9, 2026 17:04
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch from e6fab2d to 6a4dcd8 Compare January 9, 2026 17:22
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch from f5919bc to 9562030 Compare January 9, 2026 17:22
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch from 6a4dcd8 to 3a76740 Compare January 15, 2026 23:32
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch from 9562030 to 625fa9b Compare January 15, 2026 23:32
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch from 3a76740 to 0873766 Compare January 16, 2026 00:02
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch from 625fa9b to 74741ec Compare January 16, 2026 00:02
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch from 0873766 to 4119ee4 Compare January 16, 2026 00:29
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch from 9f2289d to 129800e Compare January 23, 2026 18:57
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch from 3baa590 to 492e1fb Compare January 23, 2026 18:57
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch from 129800e to 6c1c181 Compare January 23, 2026 19:03
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch 2 times, most recently from 3a2be8c to a175c9e Compare January 23, 2026 19:21
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch from 6c1c181 to 878bd6b Compare January 23, 2026 19:21
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch from a175c9e to 58035cf Compare January 23, 2026 19:30
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch from 878bd6b to 532249e Compare January 23, 2026 19:30
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch from 58035cf to 20df9a9 Compare January 26, 2026 15:56
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch 2 times, most recently from 12028b2 to 2c0ad3e Compare January 26, 2026 15:58
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch 2 times, most recently from 2cc9fc4 to 8a08e0c Compare January 26, 2026 16:08
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch 2 times, most recently from 225a555 to 144ab19 Compare January 26, 2026 17:05
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch 2 times, most recently from a90c965 to f47ee2f Compare January 26, 2026 18:10
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch 2 times, most recently from ea82240 to e58f044 Compare January 26, 2026 18:20
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch from f47ee2f to eda0030 Compare January 26, 2026 18:20
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch from e58f044 to e486e98 Compare January 26, 2026 18:29
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch from eda0030 to feb1195 Compare January 26, 2026 18:29
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch from e486e98 to d2d392a Compare January 26, 2026 19:52
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch from feb1195 to 619328b Compare January 26, 2026 19:52
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch from d2d392a to e3a8d6e Compare January 26, 2026 21:41
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch from 619328b to 23459d9 Compare January 26, 2026 21:41
Makes progress on #5
Closes #1831
Closes #1832

gherrit-pr-id: G27dd847426e3572e87b20bd64642c9fcb0e51ec8
@joshlf joshlf force-pushed the G7691845b6b02e9f3d9578435d732bacfa6ca674f branch from e3a8d6e to 552018a Compare January 26, 2026 21:44
@joshlf joshlf force-pushed the G27dd847426e3572e87b20bd64642c9fcb0e51ec8 branch from 23459d9 to 17b9f0e Compare January 26, 2026 21:44
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.

2 participants