โ‰ˆ the.bay.news

Why does shifting right by a negative amount not shift left?

The Rust Programming Language Forum
Why does shifting right by a negative amount not shift left?
I'd expect 1u64 >> -1i32 to return 2, moving right by a negative distance is just moving left, but instead it panics. Playground: Rust Playground

0 comments

Sign in to join the discussion โ€” your thebay.events account works here.

No comments yet.