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

Implement TryFromBytes::is_bit_valid for Unalign<T> #897

Closed
Tracked by #671
joshlf opened this issue Feb 17, 2024 · 0 comments · Fixed by #903
Closed
Tracked by #671

Implement TryFromBytes::is_bit_valid for Unalign<T> #897

joshlf opened this issue Feb 17, 2024 · 0 comments · Fixed by #903

Comments

@joshlf
Copy link
Member

joshlf commented Feb 17, 2024

Currently, impl_or_verify! doesn't support is_bit_valid, and so when feature = "derive" is disabled, we emit an is_bit_valid impl which unconditionally returns true.

@joshlf joshlf mentioned this issue Feb 17, 2024
87 tasks
joshlf added a commit that referenced this issue Feb 17, 2024
This replaces the implicit implementation, which accepted all values as
bit-valid, which was unsound.

While we're here, add more test cases to `test_impls` to test
hand-rolled `is_bit_valid` impls for other types.

Closes #897
github-merge-queue bot pushed a commit that referenced this issue Feb 17, 2024
This replaces the implicit implementation, which accepted all values as
bit-valid, which was unsound.

While we're here, add more test cases to `test_impls` to test
hand-rolled `is_bit_valid` impls for other types.

Closes #897
dorryspears pushed a commit to dorryspears/zerocopy that referenced this issue Feb 20, 2024
This replaces the implicit implementation, which accepted all values as
bit-valid, which was unsound.

While we're here, add more test cases to `test_impls` to test
hand-rolled `is_bit_valid` impls for other types.

Closes google#897
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 a pull request may close this issue.

1 participant