Tracking Issue for inherent unchecked integer methods · Issue #85122 · rust-lang/rust (original) (raw)

This is a tracking issue for the unchecked_* methods on integers.

unchecked_math (stable as of #122520)

impl uN { pub const unsafe fn unchecked_add(self, rhs: uN) -> uN; pub const unsafe fn unchecked_sub(self, rhs: uN) -> uN; pub const unsafe fn unchecked_mul(self, rhs: uN) -> uN; } impl iN { pub const unsafe fn unchecked_add(self, rhs: iN) -> iN; pub const unsafe fn unchecked_sub(self, rhs: iN) -> iN; pub const unsafe fn unchecked_mul(self, rhs: iN) -> iN; }

Steps / History

unchecked_neg

impl iN { pub const unsafe fn unchecked_neg(self) -> iN; }

Steps / History

unchecked_shifts

impl uN { pub const unsafe fn unchecked_shl(self, rhs: u32) -> uN; pub const unsafe fn unchecked_shr(self, rhs: u32) -> uN; } impl iN { pub const unsafe fn unchecked_shl(self, rhs: u32) -> iN; pub const unsafe fn unchecked_shr(self, rhs: u32) -> iN; }

Steps / History

unchecked_* (aggregate)

impl uN { pub const unsafe fn unchecked_add(self, rhs: uN) -> uN; pub const unsafe fn unchecked_sub(self, rhs: uN) -> uN; pub const unsafe fn unchecked_mul(self, rhs: uN) -> uN; pub const unsafe fn unchecked_shl(self, rhs: u32) -> uN; pub const unsafe fn unchecked_shr(self, rhs: u32) -> uN; } impl iN { pub const unsafe fn unchecked_add(self, rhs: iN) -> iN; pub const unsafe fn unchecked_sub(self, rhs: iN) -> iN; pub const unsafe fn unchecked_mul(self, rhs: iN) -> iN; pub const unsafe fn unchecked_shl(self, rhs: u32) -> iN; pub const unsafe fn unchecked_shr(self, rhs: u32) -> iN; pub const unsafe fn unchecked_neg(self) -> iN; }

Steps / History

Unresolved Questions

Resolved unresolved questions: