Repository navigation
Fix compilation error caused by custom backend errors on backend override - #876
Conversation
|
Small question: moving the win7 check above the unsupported / extern_impl overrides means that on a -win7-windows- target, --cfg getrandom_backend="unsupported" (or extern_impl) would now pick windows_legacy instead right? Is that the desired behavior? |
|
Good catch! I will move it below other |
errors moduleerror module
error module|
This breaks two targets that build fine on master: Both fail with E0599. |
77fb0bb to
c2af1f7
Compare
e55d06e to
16e798f
Compare
josephlr
left a comment
There was a problem hiding this comment.
We also need to move the errors in src/backends/efi_rng.rs
Otherwise, looks good to me! Nice cleanup.
| stable-x86_64-gnu, | ||
| stable-i686-gnu, | ||
| stable-i686-msvc, | ||
| stable-x86_64-msvc, |
There was a problem hiding this comment.
This drops our 32-bit Windows support, and we have special handling for 32-bit Windows in
getrandom/src/backends/windows.rs
Lines 30 to 37 in 6a04900
Do we want to find some way to keep these working somehow? We can also figure out how to add them back in a follow-up PR if that's easier.
There was a problem hiding this comment.
Personally, I don't care about 32 bit Windows targets, so I would be fine with not testing them in CI.
Ideally, the CI failures should be fixed in a separate PR (either by removing the targets like I did here, or by fixing them properly), but I just wanted for CI to pass.
|
Thanks, both now build at 767f5b7 ( |
This fixes potential compilation errors when backend defining a custom error is overridden using
getrandom_backend.Additionally ensures that all custom errors use unique error codes.