You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a tracking issue for checked bitshifts, i.e. bitshifts that can be losslessly reversed.
ACP: rust-lang/libs-team#570
Public API
impliX/uX {// Shift succeeds if `shift < Self::BITS` and right shifting the result returns the original value.fnexact_shl(self,shift:u32) -> Option<Self>;unsafefnunchecked_exact_shl(self,shift:u32) -> Self;// Shift succeeds if `shift < Self::BITS` and left shifting the result returns the original value.fnexact_shr(self,shift:u32) -> Option<Self>;unsafefnunchecked_exact_shr(self,shift:u32) -> Self;}
Steps / History
(Remember to update the S-tracking-* label when checking boxes.)
Feature gate:
#![feature(exact_bitshifts)]This is a tracking issue for checked bitshifts, i.e. bitshifts that can be losslessly reversed.
ACP: rust-lang/libs-team#570
Public API
Steps / History
(Remember to update the
S-tracking-*label when checking boxes.)unchecked_sh{l,r}actually checked bitshifts libs-team#570 (comment)Unresolved Questions
Should
exact_shlpanic instead of returnNone, then introduce a newchecked_exact_shl -> Option? add exact bitshifts #144342 (comment)None yet.
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩