-
Notifications
You must be signed in to change notification settings - Fork 16
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
Enable the deny(unsafe_op_in_unsafe_fn)
lint everywhere in zcash-light-client-ffi we define unsafe
functions
#65
Comments
deny(unsafe_op_in_unsafe_fn)
lint everywhere we define unsafe
functionsdeny(unsafe_op_in_unsafe_fn)
lint everywhere in zcash-light-client-ffi we define unsafe
functions
This can be enabled crate-wide by adding
in |
This should also update all |
I mentioned this in a comment, but has @str4d chimed in on this change yet? He had suggested to me that he preferred that the function not be labeled unsafe, but instead that the unsafe operations be explicitly demarcated by unsafe blocks internal to the function, so that it's easier to identify which parts are actually performing unsafe operations. |
Yeah, that’s the primary portion of this issue – using And get back to vacation! |
From https://github.com/zcash-hackworks/zcash-light-client-ffi/pull/32/files#r1022962018 :
A side-effect of declaring a function
unsafe
is that unsafe operations in its body are no longer required to be inunsafe
blocks (see Rust RFC 2585 for a proposal to change this, not yet adopted). Ideally, we should enable thedeny(unsafe_op_in_unsafe_fn)
lint everywhere we defineunsafe
functions, since the style we write FFI functions in is mostly already consistent with that lint.The text was updated successfully, but these errors were encountered: