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

support bytemuck #635

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

support bytemuck #635

wants to merge 1 commit into from

Conversation

dovahcrow
Copy link
Contributor

One drawback for this PR is that it lowers the unsafe_code lint from forbid to deny because bytemuck requires unsafe.

@robjtede
Copy link
Contributor

robjtede commented Jan 11, 2024

Would #[cfg_attr(not(feature = "bytemuck), forbid(unsafe))] work?

@dovahcrow
Copy link
Contributor Author

Would #[cfg_attr(not(feature = "bytemuck), forbid(unsafe))] work?

Yeah this should work. But is it too verbose because you also need #[cfg_attr(feature = "bytemuck), deny(unsafe)]? I just feel deny is sufficient since it behaviours same as forbid but allows overridden.

@robjtede
Copy link
Contributor

Signalling forbid is important for consumers who run cargo-geiger and have no need of the bytemuck integration.

@dovahcrow
Copy link
Contributor Author

@robjtede done. I still leave deny/allow there since unsafe code is still not recommended.

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.

None yet

2 participants