Skip to content

Conversation

@joshlf
Copy link
Member

@joshlf joshlf commented Oct 2, 2024

The Reference guarantees that, even in repr(Rust) structs, fields cannot overlap. This is sufficient to guarantee the soundness of implementing IntoBytes on some repr(Rust) structs.

Closes #1794

@joshlf joshlf requested a review from jswrenn October 2, 2024 21:45
@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.46%. Comparing base (a9f09d7) to head (862b0a7).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1796   +/-   ##
=======================================
  Coverage   87.46%   87.46%           
=======================================
  Files          16       16           
  Lines        6021     6021           
=======================================
  Hits         5266     5266           
  Misses        755      755           

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

The Reference guarantees that, even in `repr(Rust)` structs, fields
cannot overlap. This is sufficient to guarantee the soundness of
implementing `IntoBytes` on some `repr(Rust)` structs.

Closes #1794
@joshlf joshlf force-pushed the repr-rust-into-bytes branch from 5e56f66 to 862b0a7 Compare October 3, 2024 13:14
@joshlf joshlf enabled auto-merge October 3, 2024 13:14
@joshlf joshlf disabled auto-merge October 3, 2024 13:14
@joshlf joshlf added this pull request to the merge queue Oct 3, 2024
Merged via the queue into main with commit cc6597a Oct 3, 2024
@joshlf joshlf deleted the repr-rust-into-bytes branch October 3, 2024 16:01
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.

Permit repr(packed) without repr(C) in some derives

3 participants