Skip to content

Conversation

@samueltardieu
Copy link
Member

clippy_lints::casts::utils::int_ty_to_nbits used to return 0 to indicate that the argument was not an integral type. It is more idiomatic to use Option<u64> as a return type.

Also, I've added a few FIXME: at places where only f32 and f64 are considered, as we now have f16 and f128 to deal with.

changelog: none

`clippy_lints::casts::utils::int_ty_to_nbits` used to return `0` to
indicate that the argument was not an integral type. It is more
idiomatic to use `Option<u64>` as a return type.
@rustbot
Copy link
Collaborator

rustbot commented Jun 2, 2025

r? @llogiq

rustbot has assigned @llogiq.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 2, 2025
@llogiq
Copy link
Contributor

llogiq commented Jun 2, 2025

Thank you!

@llogiq llogiq added this pull request to the merge queue Jun 2, 2025
Merged via the queue into rust-lang:master with commit 6fa2866 Jun 2, 2025
11 checks passed
@samueltardieu samueltardieu deleted the casts-partial-cleanup branch June 2, 2025 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants