Skip to content

Conversation

@tarcieri
Copy link
Member

In #1404 impls of Cmov and CmovEq were added to the NonZero* and Ordering types and slices thereof, which is what the unsafe code in ctutils existed to handle.

Now they can be handled like the other types cmov already has trait impls for.

And with that, we can remove all of the unsafe code in this crate, with all of it having been factored into the cmov crate, which makes that the one place to look for unsafe auditing.

With all the unsafe removed, this also adds forbid(unsafe_code).

@tarcieri tarcieri force-pushed the ctutils/use-new-cmov-trait-impls branch from 0b8fd74 to f80984e Compare January 19, 2026 04:33
In #1404 impls of `Cmov` and `CmovEq` were added to the `NonZero*` and
`Ordering` types and slices thereof, which is what the unsafe code in
`ctutils` existed to handle.

Now they can be handled like the other types `cmov` already has trait
impls for.

And with that, we can remove all of the unsafe code in this crate,
with all of it having been factored into the `cmov` crate, which makes
that the one place to look for `unsafe` auditing.

With all the `unsafe` removed, this also adds `forbid(unsafe_code)`.
@tarcieri tarcieri force-pushed the ctutils/use-new-cmov-trait-impls branch from f80984e to 94f8a30 Compare January 19, 2026 04:53
@tarcieri tarcieri merged commit 1be824b into master Jan 19, 2026
120 checks passed
@tarcieri tarcieri deleted the ctutils/use-new-cmov-trait-impls branch January 19, 2026 04:59
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.

2 participants