bytemuck
bytemuck copied to clipboard
unsafe_unsound_unstable_remove_static_asserts_for_coverage
More stable-friendly replacement for https://github.com/Lokathor/bytemuck/pull/88
Since this is a --cfg
and not a feature, and it has a scary name, it should be quite difficult and unnecessary for libraries to accidentally relax soundness checks. It'd also be reasonable to ignore this PR and let people temporarilly patch their bytemuck downstream instead per https://github.com/MaulingMonkey/thindx/commit/b6dd1844917a511797280bafb5d8c5406e6ab532 :
# Cargo.toml
[patch.crates-io]
bytemuck.git = "https://github.com/MaulingMonkey/bytemuck"
bytemuck_derive.git = "https://github.com/MaulingMonkey/bytemuck"
bytemuck.branch = "pr-unsafe-unsound-unstable-remove-static-asserts-for-coverage"
bytemuck_derive.branch = "pr-unsafe-unsound-unstable-remove-static-asserts-for-coverage"
So this lets someone turn off some of the derive checks if they use the odd cfg expression?
If so, that sounds fine I guess. However, it looks like there's some small Cargo.toml conflicts that need a fixup.
I think the point is for codecov bots to not mark the anonymous functions used for the static assertions as uncovered, I guess. But in addition to what Lok said, there's a couple more static asserts now that you'd want to add the #[cfg] to I believe :)
@MaulingMonkey looks like there's some conflicts that need fixing still