Open soraros opened 1 month ago
As title. They currently have signature
fn rotate_bits_right[shift: Int](x: T) -> T
Let's add
fn rotate_bits_right(x: T, shift: T) -> T
So people don't hand roll their own implementation and end up causing UB like in #3652.
N/A
We should probably remove support for negative shift as well, so the implementation aligns with the docstring.
shift
CC: @JoeLoser, as I recall you mentioning something similar in a previous PR.
Review Mojo's priorities
What is your request?
As title. They currently have signature
Let's add
What is your motivation for this change?
So people don't hand roll their own implementation and end up causing UB like in #3652.
Any other details?
N/A