1use crate::fmt;
4use crate::ops::{
5 Add, AddAssign, BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Div, DivAssign,
6 Mul, MulAssign, Neg, Not, Rem, RemAssign, Shl, ShlAssign, Shr, ShrAssign, Sub, SubAssign,
7};
8
9#[stable(feature = "rust1", since = "1.0.0")]
40#[derive(#[automatically_derived]
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: crate::cmp::PartialEq> crate::marker::StructuralPartialEq for
Wrapping<T> {
}
#[automatically_derived]
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: crate::cmp::PartialEq> crate::cmp::PartialEq for Wrapping<T> {
#[inline]
fn eq(&self, other: &Wrapping<T>) -> bool { self.0 == other.0 }
}PartialEq, #[automatically_derived]
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: crate::cmp::Eq> crate::cmp::Eq for Wrapping<T> {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_fields_are_eq(&self) { let _: crate::cmp::AssertParamIsEq<T>; }
}Eq, #[automatically_derived]
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: crate::cmp::PartialOrd> crate::cmp::PartialOrd for Wrapping<T> {
#[inline]
fn partial_cmp(&self, other: &Wrapping<T>)
-> crate::option::Option<crate::cmp::Ordering> {
crate::cmp::PartialOrd::partial_cmp(&self.0, &other.0)
}
}PartialOrd, #[automatically_derived]
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: crate::cmp::Ord> crate::cmp::Ord for Wrapping<T> {
#[inline]
fn cmp(&self, other: &Wrapping<T>) -> crate::cmp::Ordering {
crate::cmp::Ord::cmp(&self.0, &other.0)
}
}Ord, #[automatically_derived]
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: crate::clone::Clone> crate::clone::Clone for Wrapping<T> {
#[inline]
fn clone(&self) -> Wrapping<T> {
Wrapping(crate::clone::Clone::clone(&self.0))
}
}Clone, #[automatically_derived]
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: crate::marker::Copy> crate::marker::Copy for Wrapping<T> { }Copy, #[automatically_derived]
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: crate::default::Default> crate::default::Default for Wrapping<T> {
#[inline]
fn default() -> Wrapping<T> {
Wrapping(crate::default::Default::default())
}
}Default, #[automatically_derived]
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: crate::hash::Hash> crate::hash::Hash for Wrapping<T> {
#[inline]
fn hash<__H: crate::hash::Hasher>(&self, state: &mut __H) {
crate::hash::Hash::hash(&self.0, state)
}
}Hash)]
41#[repr(transparent)]
42#[rustc_diagnostic_item = "Wrapping"]
43pub struct Wrapping<T>(#[stable(feature = "rust1", since = "1.0.0")] pub T);
44
45#[stable(feature = "rust1", since = "1.0.0")]
46impl<T: fmt::Debug> fmt::Debug for Wrapping<T> {
47 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
48 self.0.fmt(f)
49 }
50}
51
52#[stable(feature = "wrapping_display", since = "1.10.0")]
53impl<T: fmt::Display> fmt::Display for Wrapping<T> {
54 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
55 self.0.fmt(f)
56 }
57}
58
59#[stable(feature = "wrapping_fmt", since = "1.11.0")]
60impl<T: fmt::Binary> fmt::Binary for Wrapping<T> {
61 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
62 self.0.fmt(f)
63 }
64}
65
66#[stable(feature = "wrapping_fmt", since = "1.11.0")]
67impl<T: fmt::Octal> fmt::Octal for Wrapping<T> {
68 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
69 self.0.fmt(f)
70 }
71}
72
73#[stable(feature = "wrapping_fmt", since = "1.11.0")]
74impl<T: fmt::LowerHex> fmt::LowerHex for Wrapping<T> {
75 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
76 self.0.fmt(f)
77 }
78}
79
80#[stable(feature = "wrapping_fmt", since = "1.11.0")]
81impl<T: fmt::UpperHex> fmt::UpperHex for Wrapping<T> {
82 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
83 self.0.fmt(f)
84 }
85}
86
87#[allow(unused_macros)]
88macro_rules! sh_impl_signed {
89 ($t:ident, $f:ident) => {
90 #[stable(feature = "rust1", since = "1.0.0")]
91 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
92 const impl Shl<$f> for Wrapping<$t> {
93 type Output = Wrapping<$t>;
94
95 #[inline]
96 fn shl(self, other: $f) -> Wrapping<$t> {
97 if other < 0 {
98 Wrapping(self.0.wrapping_shr(-other as u32))
99 } else {
100 Wrapping(self.0.wrapping_shl(other as u32))
101 }
102 }
103 }
104 forward_ref_binop! { impl Shl, shl for Wrapping<$t>, $f,
105 #[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
106 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
107
108 #[stable(feature = "op_assign_traits", since = "1.8.0")]
109 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
110 const impl ShlAssign<$f> for Wrapping<$t> {
111 #[inline]
112 fn shl_assign(&mut self, other: $f) {
113 *self = *self << other;
114 }
115 }
116 forward_ref_op_assign! { impl ShlAssign, shl_assign for Wrapping<$t>, $f,
117 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
118 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
119
120 #[stable(feature = "rust1", since = "1.0.0")]
121 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
122 const impl Shr<$f> for Wrapping<$t> {
123 type Output = Wrapping<$t>;
124
125 #[inline]
126 fn shr(self, other: $f) -> Wrapping<$t> {
127 if other < 0 {
128 Wrapping(self.0.wrapping_shl(-other as u32))
129 } else {
130 Wrapping(self.0.wrapping_shr(other as u32))
131 }
132 }
133 }
134 forward_ref_binop! { impl Shr, shr for Wrapping<$t>, $f,
135 #[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
136 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
137
138 #[stable(feature = "op_assign_traits", since = "1.8.0")]
139 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
140 const impl ShrAssign<$f> for Wrapping<$t> {
141 #[inline]
142 fn shr_assign(&mut self, other: $f) {
143 *self = *self >> other;
144 }
145 }
146 forward_ref_op_assign! { impl ShrAssign, shr_assign for Wrapping<$t>, $f,
147 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
148 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
149 };
150}
151
152macro_rules! sh_impl_unsigned {
153 ($t:ident, $f:ident) => {
154 #[stable(feature = "rust1", since = "1.0.0")]
155 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
156 const impl Shl<$f> for Wrapping<$t> {
157 type Output = Wrapping<$t>;
158
159 #[inline]
160 fn shl(self, other: $f) -> Wrapping<$t> {
161 Wrapping(self.0.wrapping_shl(other as u32))
162 }
163 }
164 forward_ref_binop! { impl Shl, shl for Wrapping<$t>, $f,
165 #[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
166 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
167
168 #[stable(feature = "op_assign_traits", since = "1.8.0")]
169 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
170 const impl ShlAssign<$f> for Wrapping<$t> {
171 #[inline]
172 fn shl_assign(&mut self, other: $f) {
173 *self = *self << other;
174 }
175 }
176 forward_ref_op_assign! { impl ShlAssign, shl_assign for Wrapping<$t>, $f,
177 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
178 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
179
180 #[stable(feature = "rust1", since = "1.0.0")]
181 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
182 const impl Shr<$f> for Wrapping<$t> {
183 type Output = Wrapping<$t>;
184
185 #[inline]
186 fn shr(self, other: $f) -> Wrapping<$t> {
187 Wrapping(self.0.wrapping_shr(other as u32))
188 }
189 }
190 forward_ref_binop! { impl Shr, shr for Wrapping<$t>, $f,
191 #[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
192 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
193
194 #[stable(feature = "op_assign_traits", since = "1.8.0")]
195 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
196 const impl ShrAssign<$f> for Wrapping<$t> {
197 #[inline]
198 fn shr_assign(&mut self, other: $f) {
199 *self = *self >> other;
200 }
201 }
202 forward_ref_op_assign! { impl ShrAssign, shr_assign for Wrapping<$t>, $f,
203 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
204 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
205 };
206}
207
208macro_rules! sh_impl_all {
210 ($($t:ident)*) => ($(
211 sh_impl_unsigned! { $t, usize }
217
218 )*)
225}
226
227#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for Wrapping<u8> {
type Output = Wrapping<u8>;
#[inline]
fn shl(self, other: usize) -> Wrapping<u8> {
Wrapping(self.0.wrapping_shl(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for &Wrapping<u8> {
type Output = <Wrapping<u8> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: usize) -> <Wrapping<u8> as Shl<usize>>::Output {
Shl::shl(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for Wrapping<u8> {
type Output = <Wrapping<u8> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<u8> as Shl<usize>>::Output {
Shl::shl(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for &Wrapping<u8> {
type Output = <Wrapping<u8> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<u8> as Shl<usize>>::Output {
Shl::shl(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<usize> for Wrapping<u8> {
#[inline]
fn shl_assign(&mut self, other: usize) { *self = *self << other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<&usize> for Wrapping<u8> {
#[inline]
#[track_caller]
fn shl_assign(&mut self, other: &usize) {
ShlAssign::shl_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for Wrapping<u8> {
type Output = Wrapping<u8>;
#[inline]
fn shr(self, other: usize) -> Wrapping<u8> {
Wrapping(self.0.wrapping_shr(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for &Wrapping<u8> {
type Output = <Wrapping<u8> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: usize) -> <Wrapping<u8> as Shr<usize>>::Output {
Shr::shr(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for Wrapping<u8> {
type Output = <Wrapping<u8> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<u8> as Shr<usize>>::Output {
Shr::shr(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for &Wrapping<u8> {
type Output = <Wrapping<u8> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<u8> as Shr<usize>>::Output {
Shr::shr(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<usize> for Wrapping<u8> {
#[inline]
fn shr_assign(&mut self, other: usize) { *self = *self >> other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<&usize> for Wrapping<u8> {
#[inline]
#[track_caller]
fn shr_assign(&mut self, other: &usize) {
ShrAssign::shr_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for Wrapping<u16> {
type Output = Wrapping<u16>;
#[inline]
fn shl(self, other: usize) -> Wrapping<u16> {
Wrapping(self.0.wrapping_shl(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for &Wrapping<u16> {
type Output = <Wrapping<u16> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: usize) -> <Wrapping<u16> as Shl<usize>>::Output {
Shl::shl(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for Wrapping<u16> {
type Output = <Wrapping<u16> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<u16> as Shl<usize>>::Output {
Shl::shl(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for &Wrapping<u16> {
type Output = <Wrapping<u16> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<u16> as Shl<usize>>::Output {
Shl::shl(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<usize> for Wrapping<u16> {
#[inline]
fn shl_assign(&mut self, other: usize) { *self = *self << other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<&usize> for Wrapping<u16> {
#[inline]
#[track_caller]
fn shl_assign(&mut self, other: &usize) {
ShlAssign::shl_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for Wrapping<u16> {
type Output = Wrapping<u16>;
#[inline]
fn shr(self, other: usize) -> Wrapping<u16> {
Wrapping(self.0.wrapping_shr(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for &Wrapping<u16> {
type Output = <Wrapping<u16> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: usize) -> <Wrapping<u16> as Shr<usize>>::Output {
Shr::shr(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for Wrapping<u16> {
type Output = <Wrapping<u16> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<u16> as Shr<usize>>::Output {
Shr::shr(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for &Wrapping<u16> {
type Output = <Wrapping<u16> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<u16> as Shr<usize>>::Output {
Shr::shr(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<usize> for Wrapping<u16> {
#[inline]
fn shr_assign(&mut self, other: usize) { *self = *self >> other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<&usize> for Wrapping<u16> {
#[inline]
#[track_caller]
fn shr_assign(&mut self, other: &usize) {
ShrAssign::shr_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for Wrapping<u32> {
type Output = Wrapping<u32>;
#[inline]
fn shl(self, other: usize) -> Wrapping<u32> {
Wrapping(self.0.wrapping_shl(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for &Wrapping<u32> {
type Output = <Wrapping<u32> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: usize) -> <Wrapping<u32> as Shl<usize>>::Output {
Shl::shl(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for Wrapping<u32> {
type Output = <Wrapping<u32> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<u32> as Shl<usize>>::Output {
Shl::shl(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for &Wrapping<u32> {
type Output = <Wrapping<u32> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<u32> as Shl<usize>>::Output {
Shl::shl(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<usize> for Wrapping<u32> {
#[inline]
fn shl_assign(&mut self, other: usize) { *self = *self << other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<&usize> for Wrapping<u32> {
#[inline]
#[track_caller]
fn shl_assign(&mut self, other: &usize) {
ShlAssign::shl_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for Wrapping<u32> {
type Output = Wrapping<u32>;
#[inline]
fn shr(self, other: usize) -> Wrapping<u32> {
Wrapping(self.0.wrapping_shr(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for &Wrapping<u32> {
type Output = <Wrapping<u32> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: usize) -> <Wrapping<u32> as Shr<usize>>::Output {
Shr::shr(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for Wrapping<u32> {
type Output = <Wrapping<u32> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<u32> as Shr<usize>>::Output {
Shr::shr(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for &Wrapping<u32> {
type Output = <Wrapping<u32> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<u32> as Shr<usize>>::Output {
Shr::shr(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<usize> for Wrapping<u32> {
#[inline]
fn shr_assign(&mut self, other: usize) { *self = *self >> other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<&usize> for Wrapping<u32> {
#[inline]
#[track_caller]
fn shr_assign(&mut self, other: &usize) {
ShrAssign::shr_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for Wrapping<u64> {
type Output = Wrapping<u64>;
#[inline]
fn shl(self, other: usize) -> Wrapping<u64> {
Wrapping(self.0.wrapping_shl(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for &Wrapping<u64> {
type Output = <Wrapping<u64> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: usize) -> <Wrapping<u64> as Shl<usize>>::Output {
Shl::shl(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for Wrapping<u64> {
type Output = <Wrapping<u64> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<u64> as Shl<usize>>::Output {
Shl::shl(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for &Wrapping<u64> {
type Output = <Wrapping<u64> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<u64> as Shl<usize>>::Output {
Shl::shl(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<usize> for Wrapping<u64> {
#[inline]
fn shl_assign(&mut self, other: usize) { *self = *self << other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<&usize> for Wrapping<u64> {
#[inline]
#[track_caller]
fn shl_assign(&mut self, other: &usize) {
ShlAssign::shl_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for Wrapping<u64> {
type Output = Wrapping<u64>;
#[inline]
fn shr(self, other: usize) -> Wrapping<u64> {
Wrapping(self.0.wrapping_shr(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for &Wrapping<u64> {
type Output = <Wrapping<u64> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: usize) -> <Wrapping<u64> as Shr<usize>>::Output {
Shr::shr(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for Wrapping<u64> {
type Output = <Wrapping<u64> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<u64> as Shr<usize>>::Output {
Shr::shr(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for &Wrapping<u64> {
type Output = <Wrapping<u64> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<u64> as Shr<usize>>::Output {
Shr::shr(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<usize> for Wrapping<u64> {
#[inline]
fn shr_assign(&mut self, other: usize) { *self = *self >> other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<&usize> for Wrapping<u64> {
#[inline]
#[track_caller]
fn shr_assign(&mut self, other: &usize) {
ShrAssign::shr_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for Wrapping<u128> {
type Output = Wrapping<u128>;
#[inline]
fn shl(self, other: usize) -> Wrapping<u128> {
Wrapping(self.0.wrapping_shl(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for &Wrapping<u128> {
type Output = <Wrapping<u128> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: usize) -> <Wrapping<u128> as Shl<usize>>::Output {
Shl::shl(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for Wrapping<u128> {
type Output = <Wrapping<u128> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<u128> as Shl<usize>>::Output {
Shl::shl(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for &Wrapping<u128> {
type Output = <Wrapping<u128> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<u128> as Shl<usize>>::Output {
Shl::shl(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<usize> for Wrapping<u128> {
#[inline]
fn shl_assign(&mut self, other: usize) { *self = *self << other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<&usize> for Wrapping<u128> {
#[inline]
#[track_caller]
fn shl_assign(&mut self, other: &usize) {
ShlAssign::shl_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for Wrapping<u128> {
type Output = Wrapping<u128>;
#[inline]
fn shr(self, other: usize) -> Wrapping<u128> {
Wrapping(self.0.wrapping_shr(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for &Wrapping<u128> {
type Output = <Wrapping<u128> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: usize) -> <Wrapping<u128> as Shr<usize>>::Output {
Shr::shr(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for Wrapping<u128> {
type Output = <Wrapping<u128> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<u128> as Shr<usize>>::Output {
Shr::shr(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for &Wrapping<u128> {
type Output = <Wrapping<u128> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<u128> as Shr<usize>>::Output {
Shr::shr(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<usize> for Wrapping<u128> {
#[inline]
fn shr_assign(&mut self, other: usize) { *self = *self >> other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<&usize> for Wrapping<u128> {
#[inline]
#[track_caller]
fn shr_assign(&mut self, other: &usize) {
ShrAssign::shr_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for Wrapping<usize> {
type Output = Wrapping<usize>;
#[inline]
fn shl(self, other: usize) -> Wrapping<usize> {
Wrapping(self.0.wrapping_shl(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for &Wrapping<usize> {
type Output = <Wrapping<usize> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: usize) -> <Wrapping<usize> as Shl<usize>>::Output {
Shl::shl(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for Wrapping<usize> {
type Output = <Wrapping<usize> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<usize> as Shl<usize>>::Output {
Shl::shl(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for &Wrapping<usize> {
type Output = <Wrapping<usize> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<usize> as Shl<usize>>::Output {
Shl::shl(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<usize> for Wrapping<usize> {
#[inline]
fn shl_assign(&mut self, other: usize) { *self = *self << other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<&usize> for Wrapping<usize> {
#[inline]
#[track_caller]
fn shl_assign(&mut self, other: &usize) {
ShlAssign::shl_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for Wrapping<usize> {
type Output = Wrapping<usize>;
#[inline]
fn shr(self, other: usize) -> Wrapping<usize> {
Wrapping(self.0.wrapping_shr(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for &Wrapping<usize> {
type Output = <Wrapping<usize> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: usize) -> <Wrapping<usize> as Shr<usize>>::Output {
Shr::shr(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for Wrapping<usize> {
type Output = <Wrapping<usize> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<usize> as Shr<usize>>::Output {
Shr::shr(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for &Wrapping<usize> {
type Output = <Wrapping<usize> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<usize> as Shr<usize>>::Output {
Shr::shr(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<usize> for Wrapping<usize> {
#[inline]
fn shr_assign(&mut self, other: usize) { *self = *self >> other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<&usize> for Wrapping<usize> {
#[inline]
#[track_caller]
fn shr_assign(&mut self, other: &usize) {
ShrAssign::shr_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for Wrapping<i8> {
type Output = Wrapping<i8>;
#[inline]
fn shl(self, other: usize) -> Wrapping<i8> {
Wrapping(self.0.wrapping_shl(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for &Wrapping<i8> {
type Output = <Wrapping<i8> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: usize) -> <Wrapping<i8> as Shl<usize>>::Output {
Shl::shl(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for Wrapping<i8> {
type Output = <Wrapping<i8> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<i8> as Shl<usize>>::Output {
Shl::shl(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for &Wrapping<i8> {
type Output = <Wrapping<i8> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<i8> as Shl<usize>>::Output {
Shl::shl(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<usize> for Wrapping<i8> {
#[inline]
fn shl_assign(&mut self, other: usize) { *self = *self << other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<&usize> for Wrapping<i8> {
#[inline]
#[track_caller]
fn shl_assign(&mut self, other: &usize) {
ShlAssign::shl_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for Wrapping<i8> {
type Output = Wrapping<i8>;
#[inline]
fn shr(self, other: usize) -> Wrapping<i8> {
Wrapping(self.0.wrapping_shr(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for &Wrapping<i8> {
type Output = <Wrapping<i8> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: usize) -> <Wrapping<i8> as Shr<usize>>::Output {
Shr::shr(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for Wrapping<i8> {
type Output = <Wrapping<i8> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<i8> as Shr<usize>>::Output {
Shr::shr(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for &Wrapping<i8> {
type Output = <Wrapping<i8> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<i8> as Shr<usize>>::Output {
Shr::shr(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<usize> for Wrapping<i8> {
#[inline]
fn shr_assign(&mut self, other: usize) { *self = *self >> other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<&usize> for Wrapping<i8> {
#[inline]
#[track_caller]
fn shr_assign(&mut self, other: &usize) {
ShrAssign::shr_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for Wrapping<i16> {
type Output = Wrapping<i16>;
#[inline]
fn shl(self, other: usize) -> Wrapping<i16> {
Wrapping(self.0.wrapping_shl(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for &Wrapping<i16> {
type Output = <Wrapping<i16> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: usize) -> <Wrapping<i16> as Shl<usize>>::Output {
Shl::shl(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for Wrapping<i16> {
type Output = <Wrapping<i16> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<i16> as Shl<usize>>::Output {
Shl::shl(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for &Wrapping<i16> {
type Output = <Wrapping<i16> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<i16> as Shl<usize>>::Output {
Shl::shl(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<usize> for Wrapping<i16> {
#[inline]
fn shl_assign(&mut self, other: usize) { *self = *self << other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<&usize> for Wrapping<i16> {
#[inline]
#[track_caller]
fn shl_assign(&mut self, other: &usize) {
ShlAssign::shl_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for Wrapping<i16> {
type Output = Wrapping<i16>;
#[inline]
fn shr(self, other: usize) -> Wrapping<i16> {
Wrapping(self.0.wrapping_shr(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for &Wrapping<i16> {
type Output = <Wrapping<i16> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: usize) -> <Wrapping<i16> as Shr<usize>>::Output {
Shr::shr(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for Wrapping<i16> {
type Output = <Wrapping<i16> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<i16> as Shr<usize>>::Output {
Shr::shr(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for &Wrapping<i16> {
type Output = <Wrapping<i16> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<i16> as Shr<usize>>::Output {
Shr::shr(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<usize> for Wrapping<i16> {
#[inline]
fn shr_assign(&mut self, other: usize) { *self = *self >> other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<&usize> for Wrapping<i16> {
#[inline]
#[track_caller]
fn shr_assign(&mut self, other: &usize) {
ShrAssign::shr_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for Wrapping<i32> {
type Output = Wrapping<i32>;
#[inline]
fn shl(self, other: usize) -> Wrapping<i32> {
Wrapping(self.0.wrapping_shl(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for &Wrapping<i32> {
type Output = <Wrapping<i32> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: usize) -> <Wrapping<i32> as Shl<usize>>::Output {
Shl::shl(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for Wrapping<i32> {
type Output = <Wrapping<i32> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<i32> as Shl<usize>>::Output {
Shl::shl(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for &Wrapping<i32> {
type Output = <Wrapping<i32> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<i32> as Shl<usize>>::Output {
Shl::shl(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<usize> for Wrapping<i32> {
#[inline]
fn shl_assign(&mut self, other: usize) { *self = *self << other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<&usize> for Wrapping<i32> {
#[inline]
#[track_caller]
fn shl_assign(&mut self, other: &usize) {
ShlAssign::shl_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for Wrapping<i32> {
type Output = Wrapping<i32>;
#[inline]
fn shr(self, other: usize) -> Wrapping<i32> {
Wrapping(self.0.wrapping_shr(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for &Wrapping<i32> {
type Output = <Wrapping<i32> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: usize) -> <Wrapping<i32> as Shr<usize>>::Output {
Shr::shr(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for Wrapping<i32> {
type Output = <Wrapping<i32> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<i32> as Shr<usize>>::Output {
Shr::shr(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for &Wrapping<i32> {
type Output = <Wrapping<i32> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<i32> as Shr<usize>>::Output {
Shr::shr(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<usize> for Wrapping<i32> {
#[inline]
fn shr_assign(&mut self, other: usize) { *self = *self >> other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<&usize> for Wrapping<i32> {
#[inline]
#[track_caller]
fn shr_assign(&mut self, other: &usize) {
ShrAssign::shr_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for Wrapping<i64> {
type Output = Wrapping<i64>;
#[inline]
fn shl(self, other: usize) -> Wrapping<i64> {
Wrapping(self.0.wrapping_shl(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for &Wrapping<i64> {
type Output = <Wrapping<i64> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: usize) -> <Wrapping<i64> as Shl<usize>>::Output {
Shl::shl(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for Wrapping<i64> {
type Output = <Wrapping<i64> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<i64> as Shl<usize>>::Output {
Shl::shl(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for &Wrapping<i64> {
type Output = <Wrapping<i64> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<i64> as Shl<usize>>::Output {
Shl::shl(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<usize> for Wrapping<i64> {
#[inline]
fn shl_assign(&mut self, other: usize) { *self = *self << other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<&usize> for Wrapping<i64> {
#[inline]
#[track_caller]
fn shl_assign(&mut self, other: &usize) {
ShlAssign::shl_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for Wrapping<i64> {
type Output = Wrapping<i64>;
#[inline]
fn shr(self, other: usize) -> Wrapping<i64> {
Wrapping(self.0.wrapping_shr(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for &Wrapping<i64> {
type Output = <Wrapping<i64> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: usize) -> <Wrapping<i64> as Shr<usize>>::Output {
Shr::shr(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for Wrapping<i64> {
type Output = <Wrapping<i64> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<i64> as Shr<usize>>::Output {
Shr::shr(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for &Wrapping<i64> {
type Output = <Wrapping<i64> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<i64> as Shr<usize>>::Output {
Shr::shr(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<usize> for Wrapping<i64> {
#[inline]
fn shr_assign(&mut self, other: usize) { *self = *self >> other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<&usize> for Wrapping<i64> {
#[inline]
#[track_caller]
fn shr_assign(&mut self, other: &usize) {
ShrAssign::shr_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for Wrapping<i128> {
type Output = Wrapping<i128>;
#[inline]
fn shl(self, other: usize) -> Wrapping<i128> {
Wrapping(self.0.wrapping_shl(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for &Wrapping<i128> {
type Output = <Wrapping<i128> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: usize) -> <Wrapping<i128> as Shl<usize>>::Output {
Shl::shl(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for Wrapping<i128> {
type Output = <Wrapping<i128> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<i128> as Shl<usize>>::Output {
Shl::shl(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for &Wrapping<i128> {
type Output = <Wrapping<i128> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<i128> as Shl<usize>>::Output {
Shl::shl(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<usize> for Wrapping<i128> {
#[inline]
fn shl_assign(&mut self, other: usize) { *self = *self << other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<&usize> for Wrapping<i128> {
#[inline]
#[track_caller]
fn shl_assign(&mut self, other: &usize) {
ShlAssign::shl_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for Wrapping<i128> {
type Output = Wrapping<i128>;
#[inline]
fn shr(self, other: usize) -> Wrapping<i128> {
Wrapping(self.0.wrapping_shr(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for &Wrapping<i128> {
type Output = <Wrapping<i128> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: usize) -> <Wrapping<i128> as Shr<usize>>::Output {
Shr::shr(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for Wrapping<i128> {
type Output = <Wrapping<i128> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<i128> as Shr<usize>>::Output {
Shr::shr(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for &Wrapping<i128> {
type Output = <Wrapping<i128> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<i128> as Shr<usize>>::Output {
Shr::shr(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<usize> for Wrapping<i128> {
#[inline]
fn shr_assign(&mut self, other: usize) { *self = *self >> other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<&usize> for Wrapping<i128> {
#[inline]
#[track_caller]
fn shr_assign(&mut self, other: &usize) {
ShrAssign::shr_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for Wrapping<isize> {
type Output = Wrapping<isize>;
#[inline]
fn shl(self, other: usize) -> Wrapping<isize> {
Wrapping(self.0.wrapping_shl(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<usize> for &Wrapping<isize> {
type Output = <Wrapping<isize> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: usize) -> <Wrapping<isize> as Shl<usize>>::Output {
Shl::shl(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for Wrapping<isize> {
type Output = <Wrapping<isize> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<isize> as Shl<usize>>::Output {
Shl::shl(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<&usize> for &Wrapping<isize> {
type Output = <Wrapping<isize> as Shl<usize>>::Output;
#[inline]
#[track_caller]
fn shl(self, other: &usize) -> <Wrapping<isize> as Shl<usize>>::Output {
Shl::shl(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<usize> for Wrapping<isize> {
#[inline]
fn shl_assign(&mut self, other: usize) { *self = *self << other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShlAssign<&usize> for Wrapping<isize> {
#[inline]
#[track_caller]
fn shl_assign(&mut self, other: &usize) {
ShlAssign::shl_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for Wrapping<isize> {
type Output = Wrapping<isize>;
#[inline]
fn shr(self, other: usize) -> Wrapping<isize> {
Wrapping(self.0.wrapping_shr(other as u32))
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<usize> for &Wrapping<isize> {
type Output = <Wrapping<isize> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: usize) -> <Wrapping<isize> as Shr<usize>>::Output {
Shr::shr(*self, other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for Wrapping<isize> {
type Output = <Wrapping<isize> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<isize> as Shr<usize>>::Output {
Shr::shr(self, *other)
}
}
#[stable(feature = "wrapping_ref_ops", since = "1.39.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<&usize> for &Wrapping<isize> {
type Output = <Wrapping<isize> as Shr<usize>>::Output;
#[inline]
#[track_caller]
fn shr(self, other: &usize) -> <Wrapping<isize> as Shr<usize>>::Output {
Shr::shr(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<usize> for Wrapping<isize> {
#[inline]
fn shr_assign(&mut self, other: usize) { *self = *self >> other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl ShrAssign<&usize> for Wrapping<isize> {
#[inline]
#[track_caller]
fn shr_assign(&mut self, other: &usize) {
ShrAssign::shr_assign(self, *other);
}
}sh_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
228
229macro_rules! wrapping_impl {
231 ($($t:ty)*) => ($(
232 #[stable(feature = "rust1", since = "1.0.0")]
233 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
234 const impl Add for Wrapping<$t> {
235 type Output = Wrapping<$t>;
236
237 #[inline]
238 fn add(self, other: Wrapping<$t>) -> Wrapping<$t> {
239 Wrapping(self.0.wrapping_add(other.0))
240 }
241 }
242 forward_ref_binop! { impl Add, add for Wrapping<$t>, Wrapping<$t>,
243 #[stable(feature = "wrapping_ref", since = "1.14.0")]
244 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
245
246 #[stable(feature = "op_assign_traits", since = "1.8.0")]
247 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
248 const impl AddAssign for Wrapping<$t> {
249 #[inline]
250 fn add_assign(&mut self, other: Wrapping<$t>) {
251 *self = *self + other;
252 }
253 }
254 forward_ref_op_assign! { impl AddAssign, add_assign for Wrapping<$t>, Wrapping<$t>,
255 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
256 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
257
258 #[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
259 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
260 const impl AddAssign<$t> for Wrapping<$t> {
261 #[inline]
262 fn add_assign(&mut self, other: $t) {
263 *self = *self + Wrapping(other);
264 }
265 }
266 forward_ref_op_assign! { impl AddAssign, add_assign for Wrapping<$t>, $t,
267 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
268 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
269
270 #[stable(feature = "rust1", since = "1.0.0")]
271 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
272 const impl Sub for Wrapping<$t> {
273 type Output = Wrapping<$t>;
274
275 #[inline]
276 fn sub(self, other: Wrapping<$t>) -> Wrapping<$t> {
277 Wrapping(self.0.wrapping_sub(other.0))
278 }
279 }
280 forward_ref_binop! { impl Sub, sub for Wrapping<$t>, Wrapping<$t>,
281 #[stable(feature = "wrapping_ref", since = "1.14.0")]
282 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
283
284 #[stable(feature = "op_assign_traits", since = "1.8.0")]
285 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
286 const impl SubAssign for Wrapping<$t> {
287 #[inline]
288 fn sub_assign(&mut self, other: Wrapping<$t>) {
289 *self = *self - other;
290 }
291 }
292 forward_ref_op_assign! { impl SubAssign, sub_assign for Wrapping<$t>, Wrapping<$t>,
293 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
294 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
295
296 #[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
297 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
298 const impl SubAssign<$t> for Wrapping<$t> {
299 #[inline]
300 fn sub_assign(&mut self, other: $t) {
301 *self = *self - Wrapping(other);
302 }
303 }
304 forward_ref_op_assign! { impl SubAssign, sub_assign for Wrapping<$t>, $t,
305 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
306 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
307
308 #[stable(feature = "rust1", since = "1.0.0")]
309 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
310 const impl Mul for Wrapping<$t> {
311 type Output = Wrapping<$t>;
312
313 #[inline]
314 fn mul(self, other: Wrapping<$t>) -> Wrapping<$t> {
315 Wrapping(self.0.wrapping_mul(other.0))
316 }
317 }
318 forward_ref_binop! { impl Mul, mul for Wrapping<$t>, Wrapping<$t>,
319 #[stable(feature = "wrapping_ref", since = "1.14.0")]
320 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
321
322 #[stable(feature = "op_assign_traits", since = "1.8.0")]
323 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
324 const impl MulAssign for Wrapping<$t> {
325 #[inline]
326 fn mul_assign(&mut self, other: Wrapping<$t>) {
327 *self = *self * other;
328 }
329 }
330 forward_ref_op_assign! { impl MulAssign, mul_assign for Wrapping<$t>, Wrapping<$t>,
331 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
332 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
333
334 #[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
335 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
336 const impl MulAssign<$t> for Wrapping<$t> {
337 #[inline]
338 fn mul_assign(&mut self, other: $t) {
339 *self = *self * Wrapping(other);
340 }
341 }
342 forward_ref_op_assign! { impl MulAssign, mul_assign for Wrapping<$t>, $t,
343 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
344 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
345
346 #[stable(feature = "wrapping_div", since = "1.3.0")]
347 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
348 const impl Div for Wrapping<$t> {
349 type Output = Wrapping<$t>;
350
351 #[inline]
352 fn div(self, other: Wrapping<$t>) -> Wrapping<$t> {
353 Wrapping(self.0.wrapping_div(other.0))
354 }
355 }
356 forward_ref_binop! { impl Div, div for Wrapping<$t>, Wrapping<$t>,
357 #[stable(feature = "wrapping_ref", since = "1.14.0")]
358 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
359
360 #[stable(feature = "op_assign_traits", since = "1.8.0")]
361 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
362 const impl DivAssign for Wrapping<$t> {
363 #[inline]
364 fn div_assign(&mut self, other: Wrapping<$t>) {
365 *self = *self / other;
366 }
367 }
368 forward_ref_op_assign! { impl DivAssign, div_assign for Wrapping<$t>, Wrapping<$t>,
369 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
370 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
371
372 #[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
373 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
374 const impl DivAssign<$t> for Wrapping<$t> {
375 #[inline]
376 fn div_assign(&mut self, other: $t) {
377 *self = *self / Wrapping(other);
378 }
379 }
380 forward_ref_op_assign! { impl DivAssign, div_assign for Wrapping<$t>, $t,
381 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
382 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
383
384 #[stable(feature = "wrapping_impls", since = "1.7.0")]
385 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
386 const impl Rem for Wrapping<$t> {
387 type Output = Wrapping<$t>;
388
389 #[inline]
390 fn rem(self, other: Wrapping<$t>) -> Wrapping<$t> {
391 Wrapping(self.0.wrapping_rem(other.0))
392 }
393 }
394 forward_ref_binop! { impl Rem, rem for Wrapping<$t>, Wrapping<$t>,
395 #[stable(feature = "wrapping_ref", since = "1.14.0")]
396 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
397
398 #[stable(feature = "op_assign_traits", since = "1.8.0")]
399 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
400 const impl RemAssign for Wrapping<$t> {
401 #[inline]
402 fn rem_assign(&mut self, other: Wrapping<$t>) {
403 *self = *self % other;
404 }
405 }
406 forward_ref_op_assign! { impl RemAssign, rem_assign for Wrapping<$t>, Wrapping<$t>,
407 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
408 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
409
410 #[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
411 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
412 const impl RemAssign<$t> for Wrapping<$t> {
413 #[inline]
414 fn rem_assign(&mut self, other: $t) {
415 *self = *self % Wrapping(other);
416 }
417 }
418 forward_ref_op_assign! { impl RemAssign, rem_assign for Wrapping<$t>, $t,
419 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
420 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
421
422 #[stable(feature = "rust1", since = "1.0.0")]
423 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
424 const impl Not for Wrapping<$t> {
425 type Output = Wrapping<$t>;
426
427 #[inline]
428 fn not(self) -> Wrapping<$t> {
429 Wrapping(!self.0)
430 }
431 }
432 forward_ref_unop! { impl Not, not for Wrapping<$t>,
433 #[stable(feature = "wrapping_ref", since = "1.14.0")]
434 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
435
436 #[stable(feature = "rust1", since = "1.0.0")]
437 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
438 const impl BitXor for Wrapping<$t> {
439 type Output = Wrapping<$t>;
440
441 #[inline]
442 fn bitxor(self, other: Wrapping<$t>) -> Wrapping<$t> {
443 Wrapping(self.0 ^ other.0)
444 }
445 }
446 forward_ref_binop! { impl BitXor, bitxor for Wrapping<$t>, Wrapping<$t>,
447 #[stable(feature = "wrapping_ref", since = "1.14.0")]
448 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
449
450 #[stable(feature = "op_assign_traits", since = "1.8.0")]
451 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
452 const impl BitXorAssign for Wrapping<$t> {
453 #[inline]
454 fn bitxor_assign(&mut self, other: Wrapping<$t>) {
455 *self = *self ^ other;
456 }
457 }
458 forward_ref_op_assign! { impl BitXorAssign, bitxor_assign for Wrapping<$t>, Wrapping<$t>,
459 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
460 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
461
462 #[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
463 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
464 const impl BitXorAssign<$t> for Wrapping<$t> {
465 #[inline]
466 fn bitxor_assign(&mut self, other: $t) {
467 *self = *self ^ Wrapping(other);
468 }
469 }
470 forward_ref_op_assign! { impl BitXorAssign, bitxor_assign for Wrapping<$t>, $t,
471 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
472 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
473
474 #[stable(feature = "rust1", since = "1.0.0")]
475 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
476 const impl BitOr for Wrapping<$t> {
477 type Output = Wrapping<$t>;
478
479 #[inline]
480 fn bitor(self, other: Wrapping<$t>) -> Wrapping<$t> {
481 Wrapping(self.0 | other.0)
482 }
483 }
484 forward_ref_binop! { impl BitOr, bitor for Wrapping<$t>, Wrapping<$t>,
485 #[stable(feature = "wrapping_ref", since = "1.14.0")]
486 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
487
488 #[stable(feature = "op_assign_traits", since = "1.8.0")]
489 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
490 const impl BitOrAssign for Wrapping<$t> {
491 #[inline]
492 fn bitor_assign(&mut self, other: Wrapping<$t>) {
493 *self = *self | other;
494 }
495 }
496 forward_ref_op_assign! { impl BitOrAssign, bitor_assign for Wrapping<$t>, Wrapping<$t>,
497 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
498 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
499
500 #[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
501 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
502 const impl BitOrAssign<$t> for Wrapping<$t> {
503 #[inline]
504 fn bitor_assign(&mut self, other: $t) {
505 *self = *self | Wrapping(other);
506 }
507 }
508 forward_ref_op_assign! { impl BitOrAssign, bitor_assign for Wrapping<$t>, $t,
509 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
510 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
511
512 #[stable(feature = "rust1", since = "1.0.0")]
513 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
514 const impl BitAnd for Wrapping<$t> {
515 type Output = Wrapping<$t>;
516
517 #[inline]
518 fn bitand(self, other: Wrapping<$t>) -> Wrapping<$t> {
519 Wrapping(self.0 & other.0)
520 }
521 }
522 forward_ref_binop! { impl BitAnd, bitand for Wrapping<$t>, Wrapping<$t>,
523 #[stable(feature = "wrapping_ref", since = "1.14.0")]
524 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
525
526 #[stable(feature = "op_assign_traits", since = "1.8.0")]
527 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
528 const impl BitAndAssign for Wrapping<$t> {
529 #[inline]
530 fn bitand_assign(&mut self, other: Wrapping<$t>) {
531 *self = *self & other;
532 }
533 }
534 forward_ref_op_assign! { impl BitAndAssign, bitand_assign for Wrapping<$t>, Wrapping<$t>,
535 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
536 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
537
538 #[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
539 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
540 const impl BitAndAssign<$t> for Wrapping<$t> {
541 #[inline]
542 fn bitand_assign(&mut self, other: $t) {
543 *self = *self & Wrapping(other);
544 }
545 }
546 forward_ref_op_assign! { impl BitAndAssign, bitand_assign for Wrapping<$t>, $t,
547 #[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
548 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
549
550 #[stable(feature = "wrapping_neg", since = "1.10.0")]
551 #[rustc_const_unstable(feature = "const_ops", issue = "143802")]
552 const impl Neg for Wrapping<$t> {
553 type Output = Self;
554 #[inline]
555 fn neg(self) -> Self {
556 Wrapping(0) - self
557 }
558 }
559 forward_ref_unop! { impl Neg, neg for Wrapping<$t>,
560 #[stable(feature = "wrapping_ref", since = "1.14.0")]
561 #[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
562
563 )*)
564}
565
566#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add for Wrapping<usize> {
type Output = Wrapping<usize>;
#[inline]
fn add(self, other: Wrapping<usize>) -> Wrapping<usize> {
Wrapping(self.0.wrapping_add(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as Add<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: Wrapping<usize>)
-> <Wrapping<usize> as Add<Wrapping<usize>>>::Output {
Add::add(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<usize>> for Wrapping<usize> {
type Output = <Wrapping<usize> as Add<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as Add<Wrapping<usize>>>::Output {
Add::add(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as Add<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as Add<Wrapping<usize>>>::Output {
Add::add(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign for Wrapping<usize> {
#[inline]
fn add_assign(&mut self, other: Wrapping<usize>) {
*self = *self + other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&Wrapping<usize>> for Wrapping<usize> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &Wrapping<usize>) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<usize> for Wrapping<usize> {
#[inline]
fn add_assign(&mut self, other: usize) {
*self = *self + Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&usize> for Wrapping<usize> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &usize) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub for Wrapping<usize> {
type Output = Wrapping<usize>;
#[inline]
fn sub(self, other: Wrapping<usize>) -> Wrapping<usize> {
Wrapping(self.0.wrapping_sub(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as Sub<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: Wrapping<usize>)
-> <Wrapping<usize> as Sub<Wrapping<usize>>>::Output {
Sub::sub(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<usize>> for Wrapping<usize> {
type Output = <Wrapping<usize> as Sub<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as Sub<Wrapping<usize>>>::Output {
Sub::sub(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as Sub<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as Sub<Wrapping<usize>>>::Output {
Sub::sub(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign for Wrapping<usize> {
#[inline]
fn sub_assign(&mut self, other: Wrapping<usize>) {
*self = *self - other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&Wrapping<usize>> for Wrapping<usize> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &Wrapping<usize>) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<usize> for Wrapping<usize> {
#[inline]
fn sub_assign(&mut self, other: usize) {
*self = *self - Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&usize> for Wrapping<usize> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &usize) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul for Wrapping<usize> {
type Output = Wrapping<usize>;
#[inline]
fn mul(self, other: Wrapping<usize>) -> Wrapping<usize> {
Wrapping(self.0.wrapping_mul(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as Mul<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: Wrapping<usize>)
-> <Wrapping<usize> as Mul<Wrapping<usize>>>::Output {
Mul::mul(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<usize>> for Wrapping<usize> {
type Output = <Wrapping<usize> as Mul<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as Mul<Wrapping<usize>>>::Output {
Mul::mul(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as Mul<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as Mul<Wrapping<usize>>>::Output {
Mul::mul(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign for Wrapping<usize> {
#[inline]
fn mul_assign(&mut self, other: Wrapping<usize>) {
*self = *self * other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&Wrapping<usize>> for Wrapping<usize> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &Wrapping<usize>) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<usize> for Wrapping<usize> {
#[inline]
fn mul_assign(&mut self, other: usize) {
*self = *self * Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&usize> for Wrapping<usize> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &usize) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_div", since = "1.3.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div for Wrapping<usize> {
type Output = Wrapping<usize>;
#[inline]
fn div(self, other: Wrapping<usize>) -> Wrapping<usize> {
Wrapping(self.0.wrapping_div(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as Div<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: Wrapping<usize>)
-> <Wrapping<usize> as Div<Wrapping<usize>>>::Output {
Div::div(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<usize>> for Wrapping<usize> {
type Output = <Wrapping<usize> as Div<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as Div<Wrapping<usize>>>::Output {
Div::div(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as Div<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as Div<Wrapping<usize>>>::Output {
Div::div(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign for Wrapping<usize> {
#[inline]
fn div_assign(&mut self, other: Wrapping<usize>) {
*self = *self / other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&Wrapping<usize>> for Wrapping<usize> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &Wrapping<usize>) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<usize> for Wrapping<usize> {
#[inline]
fn div_assign(&mut self, other: usize) {
*self = *self / Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&usize> for Wrapping<usize> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &usize) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_impls", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem for Wrapping<usize> {
type Output = Wrapping<usize>;
#[inline]
fn rem(self, other: Wrapping<usize>) -> Wrapping<usize> {
Wrapping(self.0.wrapping_rem(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as Rem<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: Wrapping<usize>)
-> <Wrapping<usize> as Rem<Wrapping<usize>>>::Output {
Rem::rem(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<usize>> for Wrapping<usize> {
type Output = <Wrapping<usize> as Rem<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as Rem<Wrapping<usize>>>::Output {
Rem::rem(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as Rem<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as Rem<Wrapping<usize>>>::Output {
Rem::rem(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign for Wrapping<usize> {
#[inline]
fn rem_assign(&mut self, other: Wrapping<usize>) {
*self = *self % other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&Wrapping<usize>> for Wrapping<usize> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &Wrapping<usize>) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<usize> for Wrapping<usize> {
#[inline]
fn rem_assign(&mut self, other: usize) {
*self = *self % Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&usize> for Wrapping<usize> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &usize) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for Wrapping<usize> {
type Output = Wrapping<usize>;
#[inline]
fn not(self) -> Wrapping<usize> { Wrapping(!self.0) }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for &Wrapping<usize> {
type Output = <Wrapping<usize> as Not>::Output;
#[inline]
fn not(self) -> <Wrapping<usize> as Not>::Output { Not::not(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor for Wrapping<usize> {
type Output = Wrapping<usize>;
#[inline]
fn bitxor(self, other: Wrapping<usize>) -> Wrapping<usize> {
Wrapping(self.0 ^ other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as BitXor<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: Wrapping<usize>)
-> <Wrapping<usize> as BitXor<Wrapping<usize>>>::Output {
BitXor::bitxor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<usize>> for Wrapping<usize> {
type Output = <Wrapping<usize> as BitXor<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as BitXor<Wrapping<usize>>>::Output {
BitXor::bitxor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as BitXor<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as BitXor<Wrapping<usize>>>::Output {
BitXor::bitxor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign for Wrapping<usize> {
#[inline]
fn bitxor_assign(&mut self, other: Wrapping<usize>) {
*self = *self ^ other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&Wrapping<usize>> for Wrapping<usize> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &Wrapping<usize>) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<usize> for Wrapping<usize> {
#[inline]
fn bitxor_assign(&mut self, other: usize) {
*self = *self ^ Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&usize> for Wrapping<usize> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &usize) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr for Wrapping<usize> {
type Output = Wrapping<usize>;
#[inline]
fn bitor(self, other: Wrapping<usize>) -> Wrapping<usize> {
Wrapping(self.0 | other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as BitOr<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: Wrapping<usize>)
-> <Wrapping<usize> as BitOr<Wrapping<usize>>>::Output {
BitOr::bitor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<usize>> for Wrapping<usize> {
type Output = <Wrapping<usize> as BitOr<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as BitOr<Wrapping<usize>>>::Output {
BitOr::bitor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as BitOr<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as BitOr<Wrapping<usize>>>::Output {
BitOr::bitor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign for Wrapping<usize> {
#[inline]
fn bitor_assign(&mut self, other: Wrapping<usize>) {
*self = *self | other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&Wrapping<usize>> for Wrapping<usize> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &Wrapping<usize>) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<usize> for Wrapping<usize> {
#[inline]
fn bitor_assign(&mut self, other: usize) {
*self = *self | Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&usize> for Wrapping<usize> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &usize) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd for Wrapping<usize> {
type Output = Wrapping<usize>;
#[inline]
fn bitand(self, other: Wrapping<usize>) -> Wrapping<usize> {
Wrapping(self.0 & other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as BitAnd<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: Wrapping<usize>)
-> <Wrapping<usize> as BitAnd<Wrapping<usize>>>::Output {
BitAnd::bitand(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<usize>> for Wrapping<usize> {
type Output = <Wrapping<usize> as BitAnd<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as BitAnd<Wrapping<usize>>>::Output {
BitAnd::bitand(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<usize>> for &Wrapping<usize> {
type Output = <Wrapping<usize> as BitAnd<Wrapping<usize>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<usize>)
-> <Wrapping<usize> as BitAnd<Wrapping<usize>>>::Output {
BitAnd::bitand(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign for Wrapping<usize> {
#[inline]
fn bitand_assign(&mut self, other: Wrapping<usize>) {
*self = *self & other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&Wrapping<usize>> for Wrapping<usize> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &Wrapping<usize>) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<usize> for Wrapping<usize> {
#[inline]
fn bitand_assign(&mut self, other: usize) {
*self = *self & Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&usize> for Wrapping<usize> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &usize) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_neg", since = "1.10.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for Wrapping<usize> {
type Output = Self;
#[inline]
fn neg(self) -> Self { Wrapping(0) - self }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for &Wrapping<usize> {
type Output = <Wrapping<usize> as Neg>::Output;
#[inline]
fn neg(self) -> <Wrapping<usize> as Neg>::Output { Neg::neg(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add for Wrapping<u8> {
type Output = Wrapping<u8>;
#[inline]
fn add(self, other: Wrapping<u8>) -> Wrapping<u8> {
Wrapping(self.0.wrapping_add(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as Add<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: Wrapping<u8>)
-> <Wrapping<u8> as Add<Wrapping<u8>>>::Output {
Add::add(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<u8>> for Wrapping<u8> {
type Output = <Wrapping<u8> as Add<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as Add<Wrapping<u8>>>::Output {
Add::add(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as Add<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as Add<Wrapping<u8>>>::Output {
Add::add(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign for Wrapping<u8> {
#[inline]
fn add_assign(&mut self, other: Wrapping<u8>) { *self = *self + other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&Wrapping<u8>> for Wrapping<u8> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &Wrapping<u8>) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<u8> for Wrapping<u8> {
#[inline]
fn add_assign(&mut self, other: u8) { *self = *self + Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&u8> for Wrapping<u8> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &u8) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub for Wrapping<u8> {
type Output = Wrapping<u8>;
#[inline]
fn sub(self, other: Wrapping<u8>) -> Wrapping<u8> {
Wrapping(self.0.wrapping_sub(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as Sub<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: Wrapping<u8>)
-> <Wrapping<u8> as Sub<Wrapping<u8>>>::Output {
Sub::sub(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<u8>> for Wrapping<u8> {
type Output = <Wrapping<u8> as Sub<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as Sub<Wrapping<u8>>>::Output {
Sub::sub(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as Sub<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as Sub<Wrapping<u8>>>::Output {
Sub::sub(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign for Wrapping<u8> {
#[inline]
fn sub_assign(&mut self, other: Wrapping<u8>) { *self = *self - other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&Wrapping<u8>> for Wrapping<u8> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &Wrapping<u8>) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<u8> for Wrapping<u8> {
#[inline]
fn sub_assign(&mut self, other: u8) { *self = *self - Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&u8> for Wrapping<u8> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &u8) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul for Wrapping<u8> {
type Output = Wrapping<u8>;
#[inline]
fn mul(self, other: Wrapping<u8>) -> Wrapping<u8> {
Wrapping(self.0.wrapping_mul(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as Mul<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: Wrapping<u8>)
-> <Wrapping<u8> as Mul<Wrapping<u8>>>::Output {
Mul::mul(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<u8>> for Wrapping<u8> {
type Output = <Wrapping<u8> as Mul<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as Mul<Wrapping<u8>>>::Output {
Mul::mul(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as Mul<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as Mul<Wrapping<u8>>>::Output {
Mul::mul(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign for Wrapping<u8> {
#[inline]
fn mul_assign(&mut self, other: Wrapping<u8>) { *self = *self * other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&Wrapping<u8>> for Wrapping<u8> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &Wrapping<u8>) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<u8> for Wrapping<u8> {
#[inline]
fn mul_assign(&mut self, other: u8) { *self = *self * Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&u8> for Wrapping<u8> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &u8) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_div", since = "1.3.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div for Wrapping<u8> {
type Output = Wrapping<u8>;
#[inline]
fn div(self, other: Wrapping<u8>) -> Wrapping<u8> {
Wrapping(self.0.wrapping_div(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as Div<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: Wrapping<u8>)
-> <Wrapping<u8> as Div<Wrapping<u8>>>::Output {
Div::div(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<u8>> for Wrapping<u8> {
type Output = <Wrapping<u8> as Div<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as Div<Wrapping<u8>>>::Output {
Div::div(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as Div<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as Div<Wrapping<u8>>>::Output {
Div::div(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign for Wrapping<u8> {
#[inline]
fn div_assign(&mut self, other: Wrapping<u8>) { *self = *self / other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&Wrapping<u8>> for Wrapping<u8> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &Wrapping<u8>) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<u8> for Wrapping<u8> {
#[inline]
fn div_assign(&mut self, other: u8) { *self = *self / Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&u8> for Wrapping<u8> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &u8) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_impls", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem for Wrapping<u8> {
type Output = Wrapping<u8>;
#[inline]
fn rem(self, other: Wrapping<u8>) -> Wrapping<u8> {
Wrapping(self.0.wrapping_rem(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as Rem<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: Wrapping<u8>)
-> <Wrapping<u8> as Rem<Wrapping<u8>>>::Output {
Rem::rem(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<u8>> for Wrapping<u8> {
type Output = <Wrapping<u8> as Rem<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as Rem<Wrapping<u8>>>::Output {
Rem::rem(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as Rem<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as Rem<Wrapping<u8>>>::Output {
Rem::rem(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign for Wrapping<u8> {
#[inline]
fn rem_assign(&mut self, other: Wrapping<u8>) { *self = *self % other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&Wrapping<u8>> for Wrapping<u8> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &Wrapping<u8>) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<u8> for Wrapping<u8> {
#[inline]
fn rem_assign(&mut self, other: u8) { *self = *self % Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&u8> for Wrapping<u8> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &u8) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for Wrapping<u8> {
type Output = Wrapping<u8>;
#[inline]
fn not(self) -> Wrapping<u8> { Wrapping(!self.0) }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for &Wrapping<u8> {
type Output = <Wrapping<u8> as Not>::Output;
#[inline]
fn not(self) -> <Wrapping<u8> as Not>::Output { Not::not(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor for Wrapping<u8> {
type Output = Wrapping<u8>;
#[inline]
fn bitxor(self, other: Wrapping<u8>) -> Wrapping<u8> {
Wrapping(self.0 ^ other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as BitXor<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: Wrapping<u8>)
-> <Wrapping<u8> as BitXor<Wrapping<u8>>>::Output {
BitXor::bitxor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<u8>> for Wrapping<u8> {
type Output = <Wrapping<u8> as BitXor<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as BitXor<Wrapping<u8>>>::Output {
BitXor::bitxor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as BitXor<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as BitXor<Wrapping<u8>>>::Output {
BitXor::bitxor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign for Wrapping<u8> {
#[inline]
fn bitxor_assign(&mut self, other: Wrapping<u8>) {
*self = *self ^ other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&Wrapping<u8>> for Wrapping<u8> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &Wrapping<u8>) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<u8> for Wrapping<u8> {
#[inline]
fn bitxor_assign(&mut self, other: u8) {
*self = *self ^ Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&u8> for Wrapping<u8> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &u8) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr for Wrapping<u8> {
type Output = Wrapping<u8>;
#[inline]
fn bitor(self, other: Wrapping<u8>) -> Wrapping<u8> {
Wrapping(self.0 | other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as BitOr<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: Wrapping<u8>)
-> <Wrapping<u8> as BitOr<Wrapping<u8>>>::Output {
BitOr::bitor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<u8>> for Wrapping<u8> {
type Output = <Wrapping<u8> as BitOr<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as BitOr<Wrapping<u8>>>::Output {
BitOr::bitor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as BitOr<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as BitOr<Wrapping<u8>>>::Output {
BitOr::bitor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign for Wrapping<u8> {
#[inline]
fn bitor_assign(&mut self, other: Wrapping<u8>) { *self = *self | other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&Wrapping<u8>> for Wrapping<u8> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &Wrapping<u8>) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<u8> for Wrapping<u8> {
#[inline]
fn bitor_assign(&mut self, other: u8) { *self = *self | Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&u8> for Wrapping<u8> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &u8) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd for Wrapping<u8> {
type Output = Wrapping<u8>;
#[inline]
fn bitand(self, other: Wrapping<u8>) -> Wrapping<u8> {
Wrapping(self.0 & other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as BitAnd<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: Wrapping<u8>)
-> <Wrapping<u8> as BitAnd<Wrapping<u8>>>::Output {
BitAnd::bitand(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<u8>> for Wrapping<u8> {
type Output = <Wrapping<u8> as BitAnd<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as BitAnd<Wrapping<u8>>>::Output {
BitAnd::bitand(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<u8>> for &Wrapping<u8> {
type Output = <Wrapping<u8> as BitAnd<Wrapping<u8>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<u8>)
-> <Wrapping<u8> as BitAnd<Wrapping<u8>>>::Output {
BitAnd::bitand(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign for Wrapping<u8> {
#[inline]
fn bitand_assign(&mut self, other: Wrapping<u8>) {
*self = *self & other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&Wrapping<u8>> for Wrapping<u8> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &Wrapping<u8>) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<u8> for Wrapping<u8> {
#[inline]
fn bitand_assign(&mut self, other: u8) {
*self = *self & Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&u8> for Wrapping<u8> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &u8) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_neg", since = "1.10.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for Wrapping<u8> {
type Output = Self;
#[inline]
fn neg(self) -> Self { Wrapping(0) - self }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for &Wrapping<u8> {
type Output = <Wrapping<u8> as Neg>::Output;
#[inline]
fn neg(self) -> <Wrapping<u8> as Neg>::Output { Neg::neg(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add for Wrapping<u16> {
type Output = Wrapping<u16>;
#[inline]
fn add(self, other: Wrapping<u16>) -> Wrapping<u16> {
Wrapping(self.0.wrapping_add(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as Add<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: Wrapping<u16>)
-> <Wrapping<u16> as Add<Wrapping<u16>>>::Output {
Add::add(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<u16>> for Wrapping<u16> {
type Output = <Wrapping<u16> as Add<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as Add<Wrapping<u16>>>::Output {
Add::add(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as Add<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as Add<Wrapping<u16>>>::Output {
Add::add(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign for Wrapping<u16> {
#[inline]
fn add_assign(&mut self, other: Wrapping<u16>) { *self = *self + other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&Wrapping<u16>> for Wrapping<u16> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &Wrapping<u16>) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<u16> for Wrapping<u16> {
#[inline]
fn add_assign(&mut self, other: u16) { *self = *self + Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&u16> for Wrapping<u16> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &u16) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub for Wrapping<u16> {
type Output = Wrapping<u16>;
#[inline]
fn sub(self, other: Wrapping<u16>) -> Wrapping<u16> {
Wrapping(self.0.wrapping_sub(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as Sub<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: Wrapping<u16>)
-> <Wrapping<u16> as Sub<Wrapping<u16>>>::Output {
Sub::sub(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<u16>> for Wrapping<u16> {
type Output = <Wrapping<u16> as Sub<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as Sub<Wrapping<u16>>>::Output {
Sub::sub(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as Sub<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as Sub<Wrapping<u16>>>::Output {
Sub::sub(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign for Wrapping<u16> {
#[inline]
fn sub_assign(&mut self, other: Wrapping<u16>) { *self = *self - other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&Wrapping<u16>> for Wrapping<u16> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &Wrapping<u16>) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<u16> for Wrapping<u16> {
#[inline]
fn sub_assign(&mut self, other: u16) { *self = *self - Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&u16> for Wrapping<u16> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &u16) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul for Wrapping<u16> {
type Output = Wrapping<u16>;
#[inline]
fn mul(self, other: Wrapping<u16>) -> Wrapping<u16> {
Wrapping(self.0.wrapping_mul(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as Mul<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: Wrapping<u16>)
-> <Wrapping<u16> as Mul<Wrapping<u16>>>::Output {
Mul::mul(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<u16>> for Wrapping<u16> {
type Output = <Wrapping<u16> as Mul<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as Mul<Wrapping<u16>>>::Output {
Mul::mul(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as Mul<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as Mul<Wrapping<u16>>>::Output {
Mul::mul(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign for Wrapping<u16> {
#[inline]
fn mul_assign(&mut self, other: Wrapping<u16>) { *self = *self * other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&Wrapping<u16>> for Wrapping<u16> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &Wrapping<u16>) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<u16> for Wrapping<u16> {
#[inline]
fn mul_assign(&mut self, other: u16) { *self = *self * Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&u16> for Wrapping<u16> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &u16) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_div", since = "1.3.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div for Wrapping<u16> {
type Output = Wrapping<u16>;
#[inline]
fn div(self, other: Wrapping<u16>) -> Wrapping<u16> {
Wrapping(self.0.wrapping_div(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as Div<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: Wrapping<u16>)
-> <Wrapping<u16> as Div<Wrapping<u16>>>::Output {
Div::div(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<u16>> for Wrapping<u16> {
type Output = <Wrapping<u16> as Div<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as Div<Wrapping<u16>>>::Output {
Div::div(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as Div<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as Div<Wrapping<u16>>>::Output {
Div::div(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign for Wrapping<u16> {
#[inline]
fn div_assign(&mut self, other: Wrapping<u16>) { *self = *self / other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&Wrapping<u16>> for Wrapping<u16> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &Wrapping<u16>) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<u16> for Wrapping<u16> {
#[inline]
fn div_assign(&mut self, other: u16) { *self = *self / Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&u16> for Wrapping<u16> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &u16) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_impls", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem for Wrapping<u16> {
type Output = Wrapping<u16>;
#[inline]
fn rem(self, other: Wrapping<u16>) -> Wrapping<u16> {
Wrapping(self.0.wrapping_rem(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as Rem<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: Wrapping<u16>)
-> <Wrapping<u16> as Rem<Wrapping<u16>>>::Output {
Rem::rem(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<u16>> for Wrapping<u16> {
type Output = <Wrapping<u16> as Rem<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as Rem<Wrapping<u16>>>::Output {
Rem::rem(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as Rem<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as Rem<Wrapping<u16>>>::Output {
Rem::rem(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign for Wrapping<u16> {
#[inline]
fn rem_assign(&mut self, other: Wrapping<u16>) { *self = *self % other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&Wrapping<u16>> for Wrapping<u16> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &Wrapping<u16>) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<u16> for Wrapping<u16> {
#[inline]
fn rem_assign(&mut self, other: u16) { *self = *self % Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&u16> for Wrapping<u16> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &u16) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for Wrapping<u16> {
type Output = Wrapping<u16>;
#[inline]
fn not(self) -> Wrapping<u16> { Wrapping(!self.0) }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for &Wrapping<u16> {
type Output = <Wrapping<u16> as Not>::Output;
#[inline]
fn not(self) -> <Wrapping<u16> as Not>::Output { Not::not(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor for Wrapping<u16> {
type Output = Wrapping<u16>;
#[inline]
fn bitxor(self, other: Wrapping<u16>) -> Wrapping<u16> {
Wrapping(self.0 ^ other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as BitXor<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: Wrapping<u16>)
-> <Wrapping<u16> as BitXor<Wrapping<u16>>>::Output {
BitXor::bitxor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<u16>> for Wrapping<u16> {
type Output = <Wrapping<u16> as BitXor<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as BitXor<Wrapping<u16>>>::Output {
BitXor::bitxor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as BitXor<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as BitXor<Wrapping<u16>>>::Output {
BitXor::bitxor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign for Wrapping<u16> {
#[inline]
fn bitxor_assign(&mut self, other: Wrapping<u16>) {
*self = *self ^ other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&Wrapping<u16>> for Wrapping<u16> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &Wrapping<u16>) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<u16> for Wrapping<u16> {
#[inline]
fn bitxor_assign(&mut self, other: u16) {
*self = *self ^ Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&u16> for Wrapping<u16> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &u16) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr for Wrapping<u16> {
type Output = Wrapping<u16>;
#[inline]
fn bitor(self, other: Wrapping<u16>) -> Wrapping<u16> {
Wrapping(self.0 | other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as BitOr<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: Wrapping<u16>)
-> <Wrapping<u16> as BitOr<Wrapping<u16>>>::Output {
BitOr::bitor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<u16>> for Wrapping<u16> {
type Output = <Wrapping<u16> as BitOr<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as BitOr<Wrapping<u16>>>::Output {
BitOr::bitor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as BitOr<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as BitOr<Wrapping<u16>>>::Output {
BitOr::bitor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign for Wrapping<u16> {
#[inline]
fn bitor_assign(&mut self, other: Wrapping<u16>) {
*self = *self | other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&Wrapping<u16>> for Wrapping<u16> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &Wrapping<u16>) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<u16> for Wrapping<u16> {
#[inline]
fn bitor_assign(&mut self, other: u16) {
*self = *self | Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&u16> for Wrapping<u16> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &u16) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd for Wrapping<u16> {
type Output = Wrapping<u16>;
#[inline]
fn bitand(self, other: Wrapping<u16>) -> Wrapping<u16> {
Wrapping(self.0 & other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as BitAnd<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: Wrapping<u16>)
-> <Wrapping<u16> as BitAnd<Wrapping<u16>>>::Output {
BitAnd::bitand(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<u16>> for Wrapping<u16> {
type Output = <Wrapping<u16> as BitAnd<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as BitAnd<Wrapping<u16>>>::Output {
BitAnd::bitand(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<u16>> for &Wrapping<u16> {
type Output = <Wrapping<u16> as BitAnd<Wrapping<u16>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<u16>)
-> <Wrapping<u16> as BitAnd<Wrapping<u16>>>::Output {
BitAnd::bitand(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign for Wrapping<u16> {
#[inline]
fn bitand_assign(&mut self, other: Wrapping<u16>) {
*self = *self & other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&Wrapping<u16>> for Wrapping<u16> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &Wrapping<u16>) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<u16> for Wrapping<u16> {
#[inline]
fn bitand_assign(&mut self, other: u16) {
*self = *self & Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&u16> for Wrapping<u16> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &u16) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_neg", since = "1.10.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for Wrapping<u16> {
type Output = Self;
#[inline]
fn neg(self) -> Self { Wrapping(0) - self }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for &Wrapping<u16> {
type Output = <Wrapping<u16> as Neg>::Output;
#[inline]
fn neg(self) -> <Wrapping<u16> as Neg>::Output { Neg::neg(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add for Wrapping<u32> {
type Output = Wrapping<u32>;
#[inline]
fn add(self, other: Wrapping<u32>) -> Wrapping<u32> {
Wrapping(self.0.wrapping_add(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as Add<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: Wrapping<u32>)
-> <Wrapping<u32> as Add<Wrapping<u32>>>::Output {
Add::add(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<u32>> for Wrapping<u32> {
type Output = <Wrapping<u32> as Add<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as Add<Wrapping<u32>>>::Output {
Add::add(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as Add<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as Add<Wrapping<u32>>>::Output {
Add::add(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign for Wrapping<u32> {
#[inline]
fn add_assign(&mut self, other: Wrapping<u32>) { *self = *self + other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&Wrapping<u32>> for Wrapping<u32> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &Wrapping<u32>) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<u32> for Wrapping<u32> {
#[inline]
fn add_assign(&mut self, other: u32) { *self = *self + Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&u32> for Wrapping<u32> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &u32) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub for Wrapping<u32> {
type Output = Wrapping<u32>;
#[inline]
fn sub(self, other: Wrapping<u32>) -> Wrapping<u32> {
Wrapping(self.0.wrapping_sub(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as Sub<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: Wrapping<u32>)
-> <Wrapping<u32> as Sub<Wrapping<u32>>>::Output {
Sub::sub(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<u32>> for Wrapping<u32> {
type Output = <Wrapping<u32> as Sub<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as Sub<Wrapping<u32>>>::Output {
Sub::sub(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as Sub<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as Sub<Wrapping<u32>>>::Output {
Sub::sub(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign for Wrapping<u32> {
#[inline]
fn sub_assign(&mut self, other: Wrapping<u32>) { *self = *self - other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&Wrapping<u32>> for Wrapping<u32> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &Wrapping<u32>) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<u32> for Wrapping<u32> {
#[inline]
fn sub_assign(&mut self, other: u32) { *self = *self - Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&u32> for Wrapping<u32> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &u32) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul for Wrapping<u32> {
type Output = Wrapping<u32>;
#[inline]
fn mul(self, other: Wrapping<u32>) -> Wrapping<u32> {
Wrapping(self.0.wrapping_mul(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as Mul<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: Wrapping<u32>)
-> <Wrapping<u32> as Mul<Wrapping<u32>>>::Output {
Mul::mul(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<u32>> for Wrapping<u32> {
type Output = <Wrapping<u32> as Mul<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as Mul<Wrapping<u32>>>::Output {
Mul::mul(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as Mul<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as Mul<Wrapping<u32>>>::Output {
Mul::mul(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign for Wrapping<u32> {
#[inline]
fn mul_assign(&mut self, other: Wrapping<u32>) { *self = *self * other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&Wrapping<u32>> for Wrapping<u32> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &Wrapping<u32>) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<u32> for Wrapping<u32> {
#[inline]
fn mul_assign(&mut self, other: u32) { *self = *self * Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&u32> for Wrapping<u32> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &u32) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_div", since = "1.3.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div for Wrapping<u32> {
type Output = Wrapping<u32>;
#[inline]
fn div(self, other: Wrapping<u32>) -> Wrapping<u32> {
Wrapping(self.0.wrapping_div(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as Div<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: Wrapping<u32>)
-> <Wrapping<u32> as Div<Wrapping<u32>>>::Output {
Div::div(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<u32>> for Wrapping<u32> {
type Output = <Wrapping<u32> as Div<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as Div<Wrapping<u32>>>::Output {
Div::div(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as Div<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as Div<Wrapping<u32>>>::Output {
Div::div(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign for Wrapping<u32> {
#[inline]
fn div_assign(&mut self, other: Wrapping<u32>) { *self = *self / other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&Wrapping<u32>> for Wrapping<u32> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &Wrapping<u32>) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<u32> for Wrapping<u32> {
#[inline]
fn div_assign(&mut self, other: u32) { *self = *self / Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&u32> for Wrapping<u32> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &u32) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_impls", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem for Wrapping<u32> {
type Output = Wrapping<u32>;
#[inline]
fn rem(self, other: Wrapping<u32>) -> Wrapping<u32> {
Wrapping(self.0.wrapping_rem(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as Rem<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: Wrapping<u32>)
-> <Wrapping<u32> as Rem<Wrapping<u32>>>::Output {
Rem::rem(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<u32>> for Wrapping<u32> {
type Output = <Wrapping<u32> as Rem<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as Rem<Wrapping<u32>>>::Output {
Rem::rem(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as Rem<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as Rem<Wrapping<u32>>>::Output {
Rem::rem(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign for Wrapping<u32> {
#[inline]
fn rem_assign(&mut self, other: Wrapping<u32>) { *self = *self % other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&Wrapping<u32>> for Wrapping<u32> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &Wrapping<u32>) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<u32> for Wrapping<u32> {
#[inline]
fn rem_assign(&mut self, other: u32) { *self = *self % Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&u32> for Wrapping<u32> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &u32) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for Wrapping<u32> {
type Output = Wrapping<u32>;
#[inline]
fn not(self) -> Wrapping<u32> { Wrapping(!self.0) }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for &Wrapping<u32> {
type Output = <Wrapping<u32> as Not>::Output;
#[inline]
fn not(self) -> <Wrapping<u32> as Not>::Output { Not::not(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor for Wrapping<u32> {
type Output = Wrapping<u32>;
#[inline]
fn bitxor(self, other: Wrapping<u32>) -> Wrapping<u32> {
Wrapping(self.0 ^ other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as BitXor<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: Wrapping<u32>)
-> <Wrapping<u32> as BitXor<Wrapping<u32>>>::Output {
BitXor::bitxor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<u32>> for Wrapping<u32> {
type Output = <Wrapping<u32> as BitXor<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as BitXor<Wrapping<u32>>>::Output {
BitXor::bitxor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as BitXor<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as BitXor<Wrapping<u32>>>::Output {
BitXor::bitxor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign for Wrapping<u32> {
#[inline]
fn bitxor_assign(&mut self, other: Wrapping<u32>) {
*self = *self ^ other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&Wrapping<u32>> for Wrapping<u32> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &Wrapping<u32>) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<u32> for Wrapping<u32> {
#[inline]
fn bitxor_assign(&mut self, other: u32) {
*self = *self ^ Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&u32> for Wrapping<u32> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &u32) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr for Wrapping<u32> {
type Output = Wrapping<u32>;
#[inline]
fn bitor(self, other: Wrapping<u32>) -> Wrapping<u32> {
Wrapping(self.0 | other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as BitOr<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: Wrapping<u32>)
-> <Wrapping<u32> as BitOr<Wrapping<u32>>>::Output {
BitOr::bitor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<u32>> for Wrapping<u32> {
type Output = <Wrapping<u32> as BitOr<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as BitOr<Wrapping<u32>>>::Output {
BitOr::bitor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as BitOr<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as BitOr<Wrapping<u32>>>::Output {
BitOr::bitor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign for Wrapping<u32> {
#[inline]
fn bitor_assign(&mut self, other: Wrapping<u32>) {
*self = *self | other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&Wrapping<u32>> for Wrapping<u32> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &Wrapping<u32>) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<u32> for Wrapping<u32> {
#[inline]
fn bitor_assign(&mut self, other: u32) {
*self = *self | Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&u32> for Wrapping<u32> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &u32) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd for Wrapping<u32> {
type Output = Wrapping<u32>;
#[inline]
fn bitand(self, other: Wrapping<u32>) -> Wrapping<u32> {
Wrapping(self.0 & other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as BitAnd<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: Wrapping<u32>)
-> <Wrapping<u32> as BitAnd<Wrapping<u32>>>::Output {
BitAnd::bitand(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<u32>> for Wrapping<u32> {
type Output = <Wrapping<u32> as BitAnd<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as BitAnd<Wrapping<u32>>>::Output {
BitAnd::bitand(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<u32>> for &Wrapping<u32> {
type Output = <Wrapping<u32> as BitAnd<Wrapping<u32>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<u32>)
-> <Wrapping<u32> as BitAnd<Wrapping<u32>>>::Output {
BitAnd::bitand(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign for Wrapping<u32> {
#[inline]
fn bitand_assign(&mut self, other: Wrapping<u32>) {
*self = *self & other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&Wrapping<u32>> for Wrapping<u32> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &Wrapping<u32>) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<u32> for Wrapping<u32> {
#[inline]
fn bitand_assign(&mut self, other: u32) {
*self = *self & Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&u32> for Wrapping<u32> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &u32) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_neg", since = "1.10.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for Wrapping<u32> {
type Output = Self;
#[inline]
fn neg(self) -> Self { Wrapping(0) - self }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for &Wrapping<u32> {
type Output = <Wrapping<u32> as Neg>::Output;
#[inline]
fn neg(self) -> <Wrapping<u32> as Neg>::Output { Neg::neg(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add for Wrapping<u64> {
type Output = Wrapping<u64>;
#[inline]
fn add(self, other: Wrapping<u64>) -> Wrapping<u64> {
Wrapping(self.0.wrapping_add(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as Add<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: Wrapping<u64>)
-> <Wrapping<u64> as Add<Wrapping<u64>>>::Output {
Add::add(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<u64>> for Wrapping<u64> {
type Output = <Wrapping<u64> as Add<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as Add<Wrapping<u64>>>::Output {
Add::add(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as Add<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as Add<Wrapping<u64>>>::Output {
Add::add(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign for Wrapping<u64> {
#[inline]
fn add_assign(&mut self, other: Wrapping<u64>) { *self = *self + other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&Wrapping<u64>> for Wrapping<u64> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &Wrapping<u64>) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<u64> for Wrapping<u64> {
#[inline]
fn add_assign(&mut self, other: u64) { *self = *self + Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&u64> for Wrapping<u64> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &u64) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub for Wrapping<u64> {
type Output = Wrapping<u64>;
#[inline]
fn sub(self, other: Wrapping<u64>) -> Wrapping<u64> {
Wrapping(self.0.wrapping_sub(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as Sub<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: Wrapping<u64>)
-> <Wrapping<u64> as Sub<Wrapping<u64>>>::Output {
Sub::sub(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<u64>> for Wrapping<u64> {
type Output = <Wrapping<u64> as Sub<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as Sub<Wrapping<u64>>>::Output {
Sub::sub(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as Sub<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as Sub<Wrapping<u64>>>::Output {
Sub::sub(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign for Wrapping<u64> {
#[inline]
fn sub_assign(&mut self, other: Wrapping<u64>) { *self = *self - other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&Wrapping<u64>> for Wrapping<u64> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &Wrapping<u64>) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<u64> for Wrapping<u64> {
#[inline]
fn sub_assign(&mut self, other: u64) { *self = *self - Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&u64> for Wrapping<u64> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &u64) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul for Wrapping<u64> {
type Output = Wrapping<u64>;
#[inline]
fn mul(self, other: Wrapping<u64>) -> Wrapping<u64> {
Wrapping(self.0.wrapping_mul(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as Mul<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: Wrapping<u64>)
-> <Wrapping<u64> as Mul<Wrapping<u64>>>::Output {
Mul::mul(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<u64>> for Wrapping<u64> {
type Output = <Wrapping<u64> as Mul<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as Mul<Wrapping<u64>>>::Output {
Mul::mul(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as Mul<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as Mul<Wrapping<u64>>>::Output {
Mul::mul(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign for Wrapping<u64> {
#[inline]
fn mul_assign(&mut self, other: Wrapping<u64>) { *self = *self * other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&Wrapping<u64>> for Wrapping<u64> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &Wrapping<u64>) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<u64> for Wrapping<u64> {
#[inline]
fn mul_assign(&mut self, other: u64) { *self = *self * Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&u64> for Wrapping<u64> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &u64) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_div", since = "1.3.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div for Wrapping<u64> {
type Output = Wrapping<u64>;
#[inline]
fn div(self, other: Wrapping<u64>) -> Wrapping<u64> {
Wrapping(self.0.wrapping_div(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as Div<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: Wrapping<u64>)
-> <Wrapping<u64> as Div<Wrapping<u64>>>::Output {
Div::div(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<u64>> for Wrapping<u64> {
type Output = <Wrapping<u64> as Div<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as Div<Wrapping<u64>>>::Output {
Div::div(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as Div<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as Div<Wrapping<u64>>>::Output {
Div::div(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign for Wrapping<u64> {
#[inline]
fn div_assign(&mut self, other: Wrapping<u64>) { *self = *self / other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&Wrapping<u64>> for Wrapping<u64> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &Wrapping<u64>) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<u64> for Wrapping<u64> {
#[inline]
fn div_assign(&mut self, other: u64) { *self = *self / Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&u64> for Wrapping<u64> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &u64) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_impls", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem for Wrapping<u64> {
type Output = Wrapping<u64>;
#[inline]
fn rem(self, other: Wrapping<u64>) -> Wrapping<u64> {
Wrapping(self.0.wrapping_rem(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as Rem<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: Wrapping<u64>)
-> <Wrapping<u64> as Rem<Wrapping<u64>>>::Output {
Rem::rem(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<u64>> for Wrapping<u64> {
type Output = <Wrapping<u64> as Rem<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as Rem<Wrapping<u64>>>::Output {
Rem::rem(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as Rem<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as Rem<Wrapping<u64>>>::Output {
Rem::rem(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign for Wrapping<u64> {
#[inline]
fn rem_assign(&mut self, other: Wrapping<u64>) { *self = *self % other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&Wrapping<u64>> for Wrapping<u64> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &Wrapping<u64>) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<u64> for Wrapping<u64> {
#[inline]
fn rem_assign(&mut self, other: u64) { *self = *self % Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&u64> for Wrapping<u64> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &u64) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for Wrapping<u64> {
type Output = Wrapping<u64>;
#[inline]
fn not(self) -> Wrapping<u64> { Wrapping(!self.0) }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for &Wrapping<u64> {
type Output = <Wrapping<u64> as Not>::Output;
#[inline]
fn not(self) -> <Wrapping<u64> as Not>::Output { Not::not(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor for Wrapping<u64> {
type Output = Wrapping<u64>;
#[inline]
fn bitxor(self, other: Wrapping<u64>) -> Wrapping<u64> {
Wrapping(self.0 ^ other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as BitXor<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: Wrapping<u64>)
-> <Wrapping<u64> as BitXor<Wrapping<u64>>>::Output {
BitXor::bitxor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<u64>> for Wrapping<u64> {
type Output = <Wrapping<u64> as BitXor<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as BitXor<Wrapping<u64>>>::Output {
BitXor::bitxor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as BitXor<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as BitXor<Wrapping<u64>>>::Output {
BitXor::bitxor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign for Wrapping<u64> {
#[inline]
fn bitxor_assign(&mut self, other: Wrapping<u64>) {
*self = *self ^ other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&Wrapping<u64>> for Wrapping<u64> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &Wrapping<u64>) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<u64> for Wrapping<u64> {
#[inline]
fn bitxor_assign(&mut self, other: u64) {
*self = *self ^ Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&u64> for Wrapping<u64> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &u64) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr for Wrapping<u64> {
type Output = Wrapping<u64>;
#[inline]
fn bitor(self, other: Wrapping<u64>) -> Wrapping<u64> {
Wrapping(self.0 | other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as BitOr<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: Wrapping<u64>)
-> <Wrapping<u64> as BitOr<Wrapping<u64>>>::Output {
BitOr::bitor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<u64>> for Wrapping<u64> {
type Output = <Wrapping<u64> as BitOr<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as BitOr<Wrapping<u64>>>::Output {
BitOr::bitor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as BitOr<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as BitOr<Wrapping<u64>>>::Output {
BitOr::bitor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign for Wrapping<u64> {
#[inline]
fn bitor_assign(&mut self, other: Wrapping<u64>) {
*self = *self | other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&Wrapping<u64>> for Wrapping<u64> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &Wrapping<u64>) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<u64> for Wrapping<u64> {
#[inline]
fn bitor_assign(&mut self, other: u64) {
*self = *self | Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&u64> for Wrapping<u64> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &u64) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd for Wrapping<u64> {
type Output = Wrapping<u64>;
#[inline]
fn bitand(self, other: Wrapping<u64>) -> Wrapping<u64> {
Wrapping(self.0 & other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as BitAnd<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: Wrapping<u64>)
-> <Wrapping<u64> as BitAnd<Wrapping<u64>>>::Output {
BitAnd::bitand(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<u64>> for Wrapping<u64> {
type Output = <Wrapping<u64> as BitAnd<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as BitAnd<Wrapping<u64>>>::Output {
BitAnd::bitand(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<u64>> for &Wrapping<u64> {
type Output = <Wrapping<u64> as BitAnd<Wrapping<u64>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<u64>)
-> <Wrapping<u64> as BitAnd<Wrapping<u64>>>::Output {
BitAnd::bitand(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign for Wrapping<u64> {
#[inline]
fn bitand_assign(&mut self, other: Wrapping<u64>) {
*self = *self & other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&Wrapping<u64>> for Wrapping<u64> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &Wrapping<u64>) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<u64> for Wrapping<u64> {
#[inline]
fn bitand_assign(&mut self, other: u64) {
*self = *self & Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&u64> for Wrapping<u64> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &u64) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_neg", since = "1.10.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for Wrapping<u64> {
type Output = Self;
#[inline]
fn neg(self) -> Self { Wrapping(0) - self }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for &Wrapping<u64> {
type Output = <Wrapping<u64> as Neg>::Output;
#[inline]
fn neg(self) -> <Wrapping<u64> as Neg>::Output { Neg::neg(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add for Wrapping<u128> {
type Output = Wrapping<u128>;
#[inline]
fn add(self, other: Wrapping<u128>) -> Wrapping<u128> {
Wrapping(self.0.wrapping_add(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as Add<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: Wrapping<u128>)
-> <Wrapping<u128> as Add<Wrapping<u128>>>::Output {
Add::add(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<u128>> for Wrapping<u128> {
type Output = <Wrapping<u128> as Add<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as Add<Wrapping<u128>>>::Output {
Add::add(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as Add<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as Add<Wrapping<u128>>>::Output {
Add::add(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign for Wrapping<u128> {
#[inline]
fn add_assign(&mut self, other: Wrapping<u128>) { *self = *self + other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&Wrapping<u128>> for Wrapping<u128> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &Wrapping<u128>) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<u128> for Wrapping<u128> {
#[inline]
fn add_assign(&mut self, other: u128) { *self = *self + Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&u128> for Wrapping<u128> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &u128) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub for Wrapping<u128> {
type Output = Wrapping<u128>;
#[inline]
fn sub(self, other: Wrapping<u128>) -> Wrapping<u128> {
Wrapping(self.0.wrapping_sub(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as Sub<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: Wrapping<u128>)
-> <Wrapping<u128> as Sub<Wrapping<u128>>>::Output {
Sub::sub(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<u128>> for Wrapping<u128> {
type Output = <Wrapping<u128> as Sub<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as Sub<Wrapping<u128>>>::Output {
Sub::sub(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as Sub<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as Sub<Wrapping<u128>>>::Output {
Sub::sub(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign for Wrapping<u128> {
#[inline]
fn sub_assign(&mut self, other: Wrapping<u128>) { *self = *self - other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&Wrapping<u128>> for Wrapping<u128> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &Wrapping<u128>) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<u128> for Wrapping<u128> {
#[inline]
fn sub_assign(&mut self, other: u128) { *self = *self - Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&u128> for Wrapping<u128> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &u128) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul for Wrapping<u128> {
type Output = Wrapping<u128>;
#[inline]
fn mul(self, other: Wrapping<u128>) -> Wrapping<u128> {
Wrapping(self.0.wrapping_mul(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as Mul<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: Wrapping<u128>)
-> <Wrapping<u128> as Mul<Wrapping<u128>>>::Output {
Mul::mul(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<u128>> for Wrapping<u128> {
type Output = <Wrapping<u128> as Mul<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as Mul<Wrapping<u128>>>::Output {
Mul::mul(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as Mul<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as Mul<Wrapping<u128>>>::Output {
Mul::mul(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign for Wrapping<u128> {
#[inline]
fn mul_assign(&mut self, other: Wrapping<u128>) { *self = *self * other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&Wrapping<u128>> for Wrapping<u128> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &Wrapping<u128>) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<u128> for Wrapping<u128> {
#[inline]
fn mul_assign(&mut self, other: u128) { *self = *self * Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&u128> for Wrapping<u128> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &u128) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_div", since = "1.3.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div for Wrapping<u128> {
type Output = Wrapping<u128>;
#[inline]
fn div(self, other: Wrapping<u128>) -> Wrapping<u128> {
Wrapping(self.0.wrapping_div(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as Div<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: Wrapping<u128>)
-> <Wrapping<u128> as Div<Wrapping<u128>>>::Output {
Div::div(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<u128>> for Wrapping<u128> {
type Output = <Wrapping<u128> as Div<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as Div<Wrapping<u128>>>::Output {
Div::div(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as Div<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as Div<Wrapping<u128>>>::Output {
Div::div(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign for Wrapping<u128> {
#[inline]
fn div_assign(&mut self, other: Wrapping<u128>) { *self = *self / other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&Wrapping<u128>> for Wrapping<u128> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &Wrapping<u128>) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<u128> for Wrapping<u128> {
#[inline]
fn div_assign(&mut self, other: u128) { *self = *self / Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&u128> for Wrapping<u128> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &u128) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_impls", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem for Wrapping<u128> {
type Output = Wrapping<u128>;
#[inline]
fn rem(self, other: Wrapping<u128>) -> Wrapping<u128> {
Wrapping(self.0.wrapping_rem(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as Rem<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: Wrapping<u128>)
-> <Wrapping<u128> as Rem<Wrapping<u128>>>::Output {
Rem::rem(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<u128>> for Wrapping<u128> {
type Output = <Wrapping<u128> as Rem<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as Rem<Wrapping<u128>>>::Output {
Rem::rem(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as Rem<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as Rem<Wrapping<u128>>>::Output {
Rem::rem(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign for Wrapping<u128> {
#[inline]
fn rem_assign(&mut self, other: Wrapping<u128>) { *self = *self % other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&Wrapping<u128>> for Wrapping<u128> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &Wrapping<u128>) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<u128> for Wrapping<u128> {
#[inline]
fn rem_assign(&mut self, other: u128) { *self = *self % Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&u128> for Wrapping<u128> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &u128) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for Wrapping<u128> {
type Output = Wrapping<u128>;
#[inline]
fn not(self) -> Wrapping<u128> { Wrapping(!self.0) }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for &Wrapping<u128> {
type Output = <Wrapping<u128> as Not>::Output;
#[inline]
fn not(self) -> <Wrapping<u128> as Not>::Output { Not::not(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor for Wrapping<u128> {
type Output = Wrapping<u128>;
#[inline]
fn bitxor(self, other: Wrapping<u128>) -> Wrapping<u128> {
Wrapping(self.0 ^ other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as BitXor<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: Wrapping<u128>)
-> <Wrapping<u128> as BitXor<Wrapping<u128>>>::Output {
BitXor::bitxor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<u128>> for Wrapping<u128> {
type Output = <Wrapping<u128> as BitXor<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as BitXor<Wrapping<u128>>>::Output {
BitXor::bitxor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as BitXor<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as BitXor<Wrapping<u128>>>::Output {
BitXor::bitxor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign for Wrapping<u128> {
#[inline]
fn bitxor_assign(&mut self, other: Wrapping<u128>) {
*self = *self ^ other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&Wrapping<u128>> for Wrapping<u128> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &Wrapping<u128>) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<u128> for Wrapping<u128> {
#[inline]
fn bitxor_assign(&mut self, other: u128) {
*self = *self ^ Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&u128> for Wrapping<u128> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &u128) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr for Wrapping<u128> {
type Output = Wrapping<u128>;
#[inline]
fn bitor(self, other: Wrapping<u128>) -> Wrapping<u128> {
Wrapping(self.0 | other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as BitOr<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: Wrapping<u128>)
-> <Wrapping<u128> as BitOr<Wrapping<u128>>>::Output {
BitOr::bitor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<u128>> for Wrapping<u128> {
type Output = <Wrapping<u128> as BitOr<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as BitOr<Wrapping<u128>>>::Output {
BitOr::bitor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as BitOr<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as BitOr<Wrapping<u128>>>::Output {
BitOr::bitor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign for Wrapping<u128> {
#[inline]
fn bitor_assign(&mut self, other: Wrapping<u128>) {
*self = *self | other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&Wrapping<u128>> for Wrapping<u128> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &Wrapping<u128>) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<u128> for Wrapping<u128> {
#[inline]
fn bitor_assign(&mut self, other: u128) {
*self = *self | Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&u128> for Wrapping<u128> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &u128) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd for Wrapping<u128> {
type Output = Wrapping<u128>;
#[inline]
fn bitand(self, other: Wrapping<u128>) -> Wrapping<u128> {
Wrapping(self.0 & other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as BitAnd<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: Wrapping<u128>)
-> <Wrapping<u128> as BitAnd<Wrapping<u128>>>::Output {
BitAnd::bitand(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<u128>> for Wrapping<u128> {
type Output = <Wrapping<u128> as BitAnd<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as BitAnd<Wrapping<u128>>>::Output {
BitAnd::bitand(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<u128>> for &Wrapping<u128> {
type Output = <Wrapping<u128> as BitAnd<Wrapping<u128>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<u128>)
-> <Wrapping<u128> as BitAnd<Wrapping<u128>>>::Output {
BitAnd::bitand(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign for Wrapping<u128> {
#[inline]
fn bitand_assign(&mut self, other: Wrapping<u128>) {
*self = *self & other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&Wrapping<u128>> for Wrapping<u128> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &Wrapping<u128>) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<u128> for Wrapping<u128> {
#[inline]
fn bitand_assign(&mut self, other: u128) {
*self = *self & Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&u128> for Wrapping<u128> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &u128) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_neg", since = "1.10.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for Wrapping<u128> {
type Output = Self;
#[inline]
fn neg(self) -> Self { Wrapping(0) - self }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for &Wrapping<u128> {
type Output = <Wrapping<u128> as Neg>::Output;
#[inline]
fn neg(self) -> <Wrapping<u128> as Neg>::Output { Neg::neg(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add for Wrapping<isize> {
type Output = Wrapping<isize>;
#[inline]
fn add(self, other: Wrapping<isize>) -> Wrapping<isize> {
Wrapping(self.0.wrapping_add(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as Add<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: Wrapping<isize>)
-> <Wrapping<isize> as Add<Wrapping<isize>>>::Output {
Add::add(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<isize>> for Wrapping<isize> {
type Output = <Wrapping<isize> as Add<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as Add<Wrapping<isize>>>::Output {
Add::add(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as Add<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as Add<Wrapping<isize>>>::Output {
Add::add(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign for Wrapping<isize> {
#[inline]
fn add_assign(&mut self, other: Wrapping<isize>) {
*self = *self + other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&Wrapping<isize>> for Wrapping<isize> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &Wrapping<isize>) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<isize> for Wrapping<isize> {
#[inline]
fn add_assign(&mut self, other: isize) {
*self = *self + Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&isize> for Wrapping<isize> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &isize) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub for Wrapping<isize> {
type Output = Wrapping<isize>;
#[inline]
fn sub(self, other: Wrapping<isize>) -> Wrapping<isize> {
Wrapping(self.0.wrapping_sub(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as Sub<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: Wrapping<isize>)
-> <Wrapping<isize> as Sub<Wrapping<isize>>>::Output {
Sub::sub(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<isize>> for Wrapping<isize> {
type Output = <Wrapping<isize> as Sub<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as Sub<Wrapping<isize>>>::Output {
Sub::sub(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as Sub<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as Sub<Wrapping<isize>>>::Output {
Sub::sub(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign for Wrapping<isize> {
#[inline]
fn sub_assign(&mut self, other: Wrapping<isize>) {
*self = *self - other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&Wrapping<isize>> for Wrapping<isize> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &Wrapping<isize>) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<isize> for Wrapping<isize> {
#[inline]
fn sub_assign(&mut self, other: isize) {
*self = *self - Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&isize> for Wrapping<isize> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &isize) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul for Wrapping<isize> {
type Output = Wrapping<isize>;
#[inline]
fn mul(self, other: Wrapping<isize>) -> Wrapping<isize> {
Wrapping(self.0.wrapping_mul(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as Mul<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: Wrapping<isize>)
-> <Wrapping<isize> as Mul<Wrapping<isize>>>::Output {
Mul::mul(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<isize>> for Wrapping<isize> {
type Output = <Wrapping<isize> as Mul<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as Mul<Wrapping<isize>>>::Output {
Mul::mul(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as Mul<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as Mul<Wrapping<isize>>>::Output {
Mul::mul(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign for Wrapping<isize> {
#[inline]
fn mul_assign(&mut self, other: Wrapping<isize>) {
*self = *self * other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&Wrapping<isize>> for Wrapping<isize> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &Wrapping<isize>) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<isize> for Wrapping<isize> {
#[inline]
fn mul_assign(&mut self, other: isize) {
*self = *self * Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&isize> for Wrapping<isize> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &isize) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_div", since = "1.3.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div for Wrapping<isize> {
type Output = Wrapping<isize>;
#[inline]
fn div(self, other: Wrapping<isize>) -> Wrapping<isize> {
Wrapping(self.0.wrapping_div(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as Div<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: Wrapping<isize>)
-> <Wrapping<isize> as Div<Wrapping<isize>>>::Output {
Div::div(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<isize>> for Wrapping<isize> {
type Output = <Wrapping<isize> as Div<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as Div<Wrapping<isize>>>::Output {
Div::div(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as Div<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as Div<Wrapping<isize>>>::Output {
Div::div(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign for Wrapping<isize> {
#[inline]
fn div_assign(&mut self, other: Wrapping<isize>) {
*self = *self / other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&Wrapping<isize>> for Wrapping<isize> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &Wrapping<isize>) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<isize> for Wrapping<isize> {
#[inline]
fn div_assign(&mut self, other: isize) {
*self = *self / Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&isize> for Wrapping<isize> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &isize) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_impls", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem for Wrapping<isize> {
type Output = Wrapping<isize>;
#[inline]
fn rem(self, other: Wrapping<isize>) -> Wrapping<isize> {
Wrapping(self.0.wrapping_rem(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as Rem<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: Wrapping<isize>)
-> <Wrapping<isize> as Rem<Wrapping<isize>>>::Output {
Rem::rem(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<isize>> for Wrapping<isize> {
type Output = <Wrapping<isize> as Rem<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as Rem<Wrapping<isize>>>::Output {
Rem::rem(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as Rem<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as Rem<Wrapping<isize>>>::Output {
Rem::rem(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign for Wrapping<isize> {
#[inline]
fn rem_assign(&mut self, other: Wrapping<isize>) {
*self = *self % other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&Wrapping<isize>> for Wrapping<isize> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &Wrapping<isize>) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<isize> for Wrapping<isize> {
#[inline]
fn rem_assign(&mut self, other: isize) {
*self = *self % Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&isize> for Wrapping<isize> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &isize) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for Wrapping<isize> {
type Output = Wrapping<isize>;
#[inline]
fn not(self) -> Wrapping<isize> { Wrapping(!self.0) }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for &Wrapping<isize> {
type Output = <Wrapping<isize> as Not>::Output;
#[inline]
fn not(self) -> <Wrapping<isize> as Not>::Output { Not::not(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor for Wrapping<isize> {
type Output = Wrapping<isize>;
#[inline]
fn bitxor(self, other: Wrapping<isize>) -> Wrapping<isize> {
Wrapping(self.0 ^ other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as BitXor<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: Wrapping<isize>)
-> <Wrapping<isize> as BitXor<Wrapping<isize>>>::Output {
BitXor::bitxor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<isize>> for Wrapping<isize> {
type Output = <Wrapping<isize> as BitXor<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as BitXor<Wrapping<isize>>>::Output {
BitXor::bitxor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as BitXor<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as BitXor<Wrapping<isize>>>::Output {
BitXor::bitxor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign for Wrapping<isize> {
#[inline]
fn bitxor_assign(&mut self, other: Wrapping<isize>) {
*self = *self ^ other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&Wrapping<isize>> for Wrapping<isize> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &Wrapping<isize>) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<isize> for Wrapping<isize> {
#[inline]
fn bitxor_assign(&mut self, other: isize) {
*self = *self ^ Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&isize> for Wrapping<isize> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &isize) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr for Wrapping<isize> {
type Output = Wrapping<isize>;
#[inline]
fn bitor(self, other: Wrapping<isize>) -> Wrapping<isize> {
Wrapping(self.0 | other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as BitOr<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: Wrapping<isize>)
-> <Wrapping<isize> as BitOr<Wrapping<isize>>>::Output {
BitOr::bitor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<isize>> for Wrapping<isize> {
type Output = <Wrapping<isize> as BitOr<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as BitOr<Wrapping<isize>>>::Output {
BitOr::bitor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as BitOr<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as BitOr<Wrapping<isize>>>::Output {
BitOr::bitor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign for Wrapping<isize> {
#[inline]
fn bitor_assign(&mut self, other: Wrapping<isize>) {
*self = *self | other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&Wrapping<isize>> for Wrapping<isize> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &Wrapping<isize>) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<isize> for Wrapping<isize> {
#[inline]
fn bitor_assign(&mut self, other: isize) {
*self = *self | Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&isize> for Wrapping<isize> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &isize) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd for Wrapping<isize> {
type Output = Wrapping<isize>;
#[inline]
fn bitand(self, other: Wrapping<isize>) -> Wrapping<isize> {
Wrapping(self.0 & other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as BitAnd<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: Wrapping<isize>)
-> <Wrapping<isize> as BitAnd<Wrapping<isize>>>::Output {
BitAnd::bitand(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<isize>> for Wrapping<isize> {
type Output = <Wrapping<isize> as BitAnd<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as BitAnd<Wrapping<isize>>>::Output {
BitAnd::bitand(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<isize>> for &Wrapping<isize> {
type Output = <Wrapping<isize> as BitAnd<Wrapping<isize>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<isize>)
-> <Wrapping<isize> as BitAnd<Wrapping<isize>>>::Output {
BitAnd::bitand(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign for Wrapping<isize> {
#[inline]
fn bitand_assign(&mut self, other: Wrapping<isize>) {
*self = *self & other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&Wrapping<isize>> for Wrapping<isize> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &Wrapping<isize>) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<isize> for Wrapping<isize> {
#[inline]
fn bitand_assign(&mut self, other: isize) {
*self = *self & Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&isize> for Wrapping<isize> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &isize) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_neg", since = "1.10.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for Wrapping<isize> {
type Output = Self;
#[inline]
fn neg(self) -> Self { Wrapping(0) - self }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for &Wrapping<isize> {
type Output = <Wrapping<isize> as Neg>::Output;
#[inline]
fn neg(self) -> <Wrapping<isize> as Neg>::Output { Neg::neg(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add for Wrapping<i8> {
type Output = Wrapping<i8>;
#[inline]
fn add(self, other: Wrapping<i8>) -> Wrapping<i8> {
Wrapping(self.0.wrapping_add(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as Add<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: Wrapping<i8>)
-> <Wrapping<i8> as Add<Wrapping<i8>>>::Output {
Add::add(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<i8>> for Wrapping<i8> {
type Output = <Wrapping<i8> as Add<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as Add<Wrapping<i8>>>::Output {
Add::add(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as Add<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as Add<Wrapping<i8>>>::Output {
Add::add(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign for Wrapping<i8> {
#[inline]
fn add_assign(&mut self, other: Wrapping<i8>) { *self = *self + other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&Wrapping<i8>> for Wrapping<i8> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &Wrapping<i8>) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<i8> for Wrapping<i8> {
#[inline]
fn add_assign(&mut self, other: i8) { *self = *self + Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&i8> for Wrapping<i8> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &i8) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub for Wrapping<i8> {
type Output = Wrapping<i8>;
#[inline]
fn sub(self, other: Wrapping<i8>) -> Wrapping<i8> {
Wrapping(self.0.wrapping_sub(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as Sub<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: Wrapping<i8>)
-> <Wrapping<i8> as Sub<Wrapping<i8>>>::Output {
Sub::sub(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<i8>> for Wrapping<i8> {
type Output = <Wrapping<i8> as Sub<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as Sub<Wrapping<i8>>>::Output {
Sub::sub(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as Sub<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as Sub<Wrapping<i8>>>::Output {
Sub::sub(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign for Wrapping<i8> {
#[inline]
fn sub_assign(&mut self, other: Wrapping<i8>) { *self = *self - other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&Wrapping<i8>> for Wrapping<i8> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &Wrapping<i8>) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<i8> for Wrapping<i8> {
#[inline]
fn sub_assign(&mut self, other: i8) { *self = *self - Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&i8> for Wrapping<i8> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &i8) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul for Wrapping<i8> {
type Output = Wrapping<i8>;
#[inline]
fn mul(self, other: Wrapping<i8>) -> Wrapping<i8> {
Wrapping(self.0.wrapping_mul(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as Mul<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: Wrapping<i8>)
-> <Wrapping<i8> as Mul<Wrapping<i8>>>::Output {
Mul::mul(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<i8>> for Wrapping<i8> {
type Output = <Wrapping<i8> as Mul<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as Mul<Wrapping<i8>>>::Output {
Mul::mul(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as Mul<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as Mul<Wrapping<i8>>>::Output {
Mul::mul(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign for Wrapping<i8> {
#[inline]
fn mul_assign(&mut self, other: Wrapping<i8>) { *self = *self * other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&Wrapping<i8>> for Wrapping<i8> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &Wrapping<i8>) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<i8> for Wrapping<i8> {
#[inline]
fn mul_assign(&mut self, other: i8) { *self = *self * Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&i8> for Wrapping<i8> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &i8) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_div", since = "1.3.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div for Wrapping<i8> {
type Output = Wrapping<i8>;
#[inline]
fn div(self, other: Wrapping<i8>) -> Wrapping<i8> {
Wrapping(self.0.wrapping_div(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as Div<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: Wrapping<i8>)
-> <Wrapping<i8> as Div<Wrapping<i8>>>::Output {
Div::div(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<i8>> for Wrapping<i8> {
type Output = <Wrapping<i8> as Div<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as Div<Wrapping<i8>>>::Output {
Div::div(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as Div<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as Div<Wrapping<i8>>>::Output {
Div::div(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign for Wrapping<i8> {
#[inline]
fn div_assign(&mut self, other: Wrapping<i8>) { *self = *self / other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&Wrapping<i8>> for Wrapping<i8> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &Wrapping<i8>) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<i8> for Wrapping<i8> {
#[inline]
fn div_assign(&mut self, other: i8) { *self = *self / Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&i8> for Wrapping<i8> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &i8) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_impls", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem for Wrapping<i8> {
type Output = Wrapping<i8>;
#[inline]
fn rem(self, other: Wrapping<i8>) -> Wrapping<i8> {
Wrapping(self.0.wrapping_rem(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as Rem<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: Wrapping<i8>)
-> <Wrapping<i8> as Rem<Wrapping<i8>>>::Output {
Rem::rem(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<i8>> for Wrapping<i8> {
type Output = <Wrapping<i8> as Rem<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as Rem<Wrapping<i8>>>::Output {
Rem::rem(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as Rem<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as Rem<Wrapping<i8>>>::Output {
Rem::rem(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign for Wrapping<i8> {
#[inline]
fn rem_assign(&mut self, other: Wrapping<i8>) { *self = *self % other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&Wrapping<i8>> for Wrapping<i8> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &Wrapping<i8>) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<i8> for Wrapping<i8> {
#[inline]
fn rem_assign(&mut self, other: i8) { *self = *self % Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&i8> for Wrapping<i8> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &i8) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for Wrapping<i8> {
type Output = Wrapping<i8>;
#[inline]
fn not(self) -> Wrapping<i8> { Wrapping(!self.0) }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for &Wrapping<i8> {
type Output = <Wrapping<i8> as Not>::Output;
#[inline]
fn not(self) -> <Wrapping<i8> as Not>::Output { Not::not(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor for Wrapping<i8> {
type Output = Wrapping<i8>;
#[inline]
fn bitxor(self, other: Wrapping<i8>) -> Wrapping<i8> {
Wrapping(self.0 ^ other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as BitXor<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: Wrapping<i8>)
-> <Wrapping<i8> as BitXor<Wrapping<i8>>>::Output {
BitXor::bitxor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<i8>> for Wrapping<i8> {
type Output = <Wrapping<i8> as BitXor<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as BitXor<Wrapping<i8>>>::Output {
BitXor::bitxor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as BitXor<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as BitXor<Wrapping<i8>>>::Output {
BitXor::bitxor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign for Wrapping<i8> {
#[inline]
fn bitxor_assign(&mut self, other: Wrapping<i8>) {
*self = *self ^ other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&Wrapping<i8>> for Wrapping<i8> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &Wrapping<i8>) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<i8> for Wrapping<i8> {
#[inline]
fn bitxor_assign(&mut self, other: i8) {
*self = *self ^ Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&i8> for Wrapping<i8> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &i8) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr for Wrapping<i8> {
type Output = Wrapping<i8>;
#[inline]
fn bitor(self, other: Wrapping<i8>) -> Wrapping<i8> {
Wrapping(self.0 | other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as BitOr<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: Wrapping<i8>)
-> <Wrapping<i8> as BitOr<Wrapping<i8>>>::Output {
BitOr::bitor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<i8>> for Wrapping<i8> {
type Output = <Wrapping<i8> as BitOr<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as BitOr<Wrapping<i8>>>::Output {
BitOr::bitor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as BitOr<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as BitOr<Wrapping<i8>>>::Output {
BitOr::bitor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign for Wrapping<i8> {
#[inline]
fn bitor_assign(&mut self, other: Wrapping<i8>) { *self = *self | other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&Wrapping<i8>> for Wrapping<i8> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &Wrapping<i8>) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<i8> for Wrapping<i8> {
#[inline]
fn bitor_assign(&mut self, other: i8) { *self = *self | Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&i8> for Wrapping<i8> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &i8) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd for Wrapping<i8> {
type Output = Wrapping<i8>;
#[inline]
fn bitand(self, other: Wrapping<i8>) -> Wrapping<i8> {
Wrapping(self.0 & other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as BitAnd<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: Wrapping<i8>)
-> <Wrapping<i8> as BitAnd<Wrapping<i8>>>::Output {
BitAnd::bitand(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<i8>> for Wrapping<i8> {
type Output = <Wrapping<i8> as BitAnd<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as BitAnd<Wrapping<i8>>>::Output {
BitAnd::bitand(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<i8>> for &Wrapping<i8> {
type Output = <Wrapping<i8> as BitAnd<Wrapping<i8>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<i8>)
-> <Wrapping<i8> as BitAnd<Wrapping<i8>>>::Output {
BitAnd::bitand(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign for Wrapping<i8> {
#[inline]
fn bitand_assign(&mut self, other: Wrapping<i8>) {
*self = *self & other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&Wrapping<i8>> for Wrapping<i8> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &Wrapping<i8>) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<i8> for Wrapping<i8> {
#[inline]
fn bitand_assign(&mut self, other: i8) {
*self = *self & Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&i8> for Wrapping<i8> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &i8) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_neg", since = "1.10.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for Wrapping<i8> {
type Output = Self;
#[inline]
fn neg(self) -> Self { Wrapping(0) - self }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for &Wrapping<i8> {
type Output = <Wrapping<i8> as Neg>::Output;
#[inline]
fn neg(self) -> <Wrapping<i8> as Neg>::Output { Neg::neg(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add for Wrapping<i16> {
type Output = Wrapping<i16>;
#[inline]
fn add(self, other: Wrapping<i16>) -> Wrapping<i16> {
Wrapping(self.0.wrapping_add(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as Add<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: Wrapping<i16>)
-> <Wrapping<i16> as Add<Wrapping<i16>>>::Output {
Add::add(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<i16>> for Wrapping<i16> {
type Output = <Wrapping<i16> as Add<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as Add<Wrapping<i16>>>::Output {
Add::add(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as Add<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as Add<Wrapping<i16>>>::Output {
Add::add(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign for Wrapping<i16> {
#[inline]
fn add_assign(&mut self, other: Wrapping<i16>) { *self = *self + other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&Wrapping<i16>> for Wrapping<i16> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &Wrapping<i16>) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<i16> for Wrapping<i16> {
#[inline]
fn add_assign(&mut self, other: i16) { *self = *self + Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&i16> for Wrapping<i16> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &i16) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub for Wrapping<i16> {
type Output = Wrapping<i16>;
#[inline]
fn sub(self, other: Wrapping<i16>) -> Wrapping<i16> {
Wrapping(self.0.wrapping_sub(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as Sub<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: Wrapping<i16>)
-> <Wrapping<i16> as Sub<Wrapping<i16>>>::Output {
Sub::sub(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<i16>> for Wrapping<i16> {
type Output = <Wrapping<i16> as Sub<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as Sub<Wrapping<i16>>>::Output {
Sub::sub(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as Sub<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as Sub<Wrapping<i16>>>::Output {
Sub::sub(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign for Wrapping<i16> {
#[inline]
fn sub_assign(&mut self, other: Wrapping<i16>) { *self = *self - other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&Wrapping<i16>> for Wrapping<i16> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &Wrapping<i16>) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<i16> for Wrapping<i16> {
#[inline]
fn sub_assign(&mut self, other: i16) { *self = *self - Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&i16> for Wrapping<i16> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &i16) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul for Wrapping<i16> {
type Output = Wrapping<i16>;
#[inline]
fn mul(self, other: Wrapping<i16>) -> Wrapping<i16> {
Wrapping(self.0.wrapping_mul(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as Mul<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: Wrapping<i16>)
-> <Wrapping<i16> as Mul<Wrapping<i16>>>::Output {
Mul::mul(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<i16>> for Wrapping<i16> {
type Output = <Wrapping<i16> as Mul<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as Mul<Wrapping<i16>>>::Output {
Mul::mul(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as Mul<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as Mul<Wrapping<i16>>>::Output {
Mul::mul(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign for Wrapping<i16> {
#[inline]
fn mul_assign(&mut self, other: Wrapping<i16>) { *self = *self * other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&Wrapping<i16>> for Wrapping<i16> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &Wrapping<i16>) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<i16> for Wrapping<i16> {
#[inline]
fn mul_assign(&mut self, other: i16) { *self = *self * Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&i16> for Wrapping<i16> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &i16) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_div", since = "1.3.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div for Wrapping<i16> {
type Output = Wrapping<i16>;
#[inline]
fn div(self, other: Wrapping<i16>) -> Wrapping<i16> {
Wrapping(self.0.wrapping_div(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as Div<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: Wrapping<i16>)
-> <Wrapping<i16> as Div<Wrapping<i16>>>::Output {
Div::div(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<i16>> for Wrapping<i16> {
type Output = <Wrapping<i16> as Div<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as Div<Wrapping<i16>>>::Output {
Div::div(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as Div<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as Div<Wrapping<i16>>>::Output {
Div::div(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign for Wrapping<i16> {
#[inline]
fn div_assign(&mut self, other: Wrapping<i16>) { *self = *self / other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&Wrapping<i16>> for Wrapping<i16> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &Wrapping<i16>) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<i16> for Wrapping<i16> {
#[inline]
fn div_assign(&mut self, other: i16) { *self = *self / Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&i16> for Wrapping<i16> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &i16) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_impls", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem for Wrapping<i16> {
type Output = Wrapping<i16>;
#[inline]
fn rem(self, other: Wrapping<i16>) -> Wrapping<i16> {
Wrapping(self.0.wrapping_rem(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as Rem<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: Wrapping<i16>)
-> <Wrapping<i16> as Rem<Wrapping<i16>>>::Output {
Rem::rem(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<i16>> for Wrapping<i16> {
type Output = <Wrapping<i16> as Rem<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as Rem<Wrapping<i16>>>::Output {
Rem::rem(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as Rem<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as Rem<Wrapping<i16>>>::Output {
Rem::rem(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign for Wrapping<i16> {
#[inline]
fn rem_assign(&mut self, other: Wrapping<i16>) { *self = *self % other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&Wrapping<i16>> for Wrapping<i16> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &Wrapping<i16>) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<i16> for Wrapping<i16> {
#[inline]
fn rem_assign(&mut self, other: i16) { *self = *self % Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&i16> for Wrapping<i16> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &i16) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for Wrapping<i16> {
type Output = Wrapping<i16>;
#[inline]
fn not(self) -> Wrapping<i16> { Wrapping(!self.0) }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for &Wrapping<i16> {
type Output = <Wrapping<i16> as Not>::Output;
#[inline]
fn not(self) -> <Wrapping<i16> as Not>::Output { Not::not(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor for Wrapping<i16> {
type Output = Wrapping<i16>;
#[inline]
fn bitxor(self, other: Wrapping<i16>) -> Wrapping<i16> {
Wrapping(self.0 ^ other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as BitXor<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: Wrapping<i16>)
-> <Wrapping<i16> as BitXor<Wrapping<i16>>>::Output {
BitXor::bitxor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<i16>> for Wrapping<i16> {
type Output = <Wrapping<i16> as BitXor<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as BitXor<Wrapping<i16>>>::Output {
BitXor::bitxor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as BitXor<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as BitXor<Wrapping<i16>>>::Output {
BitXor::bitxor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign for Wrapping<i16> {
#[inline]
fn bitxor_assign(&mut self, other: Wrapping<i16>) {
*self = *self ^ other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&Wrapping<i16>> for Wrapping<i16> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &Wrapping<i16>) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<i16> for Wrapping<i16> {
#[inline]
fn bitxor_assign(&mut self, other: i16) {
*self = *self ^ Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&i16> for Wrapping<i16> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &i16) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr for Wrapping<i16> {
type Output = Wrapping<i16>;
#[inline]
fn bitor(self, other: Wrapping<i16>) -> Wrapping<i16> {
Wrapping(self.0 | other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as BitOr<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: Wrapping<i16>)
-> <Wrapping<i16> as BitOr<Wrapping<i16>>>::Output {
BitOr::bitor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<i16>> for Wrapping<i16> {
type Output = <Wrapping<i16> as BitOr<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as BitOr<Wrapping<i16>>>::Output {
BitOr::bitor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as BitOr<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as BitOr<Wrapping<i16>>>::Output {
BitOr::bitor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign for Wrapping<i16> {
#[inline]
fn bitor_assign(&mut self, other: Wrapping<i16>) {
*self = *self | other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&Wrapping<i16>> for Wrapping<i16> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &Wrapping<i16>) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<i16> for Wrapping<i16> {
#[inline]
fn bitor_assign(&mut self, other: i16) {
*self = *self | Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&i16> for Wrapping<i16> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &i16) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd for Wrapping<i16> {
type Output = Wrapping<i16>;
#[inline]
fn bitand(self, other: Wrapping<i16>) -> Wrapping<i16> {
Wrapping(self.0 & other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as BitAnd<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: Wrapping<i16>)
-> <Wrapping<i16> as BitAnd<Wrapping<i16>>>::Output {
BitAnd::bitand(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<i16>> for Wrapping<i16> {
type Output = <Wrapping<i16> as BitAnd<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as BitAnd<Wrapping<i16>>>::Output {
BitAnd::bitand(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<i16>> for &Wrapping<i16> {
type Output = <Wrapping<i16> as BitAnd<Wrapping<i16>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<i16>)
-> <Wrapping<i16> as BitAnd<Wrapping<i16>>>::Output {
BitAnd::bitand(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign for Wrapping<i16> {
#[inline]
fn bitand_assign(&mut self, other: Wrapping<i16>) {
*self = *self & other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&Wrapping<i16>> for Wrapping<i16> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &Wrapping<i16>) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<i16> for Wrapping<i16> {
#[inline]
fn bitand_assign(&mut self, other: i16) {
*self = *self & Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&i16> for Wrapping<i16> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &i16) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_neg", since = "1.10.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for Wrapping<i16> {
type Output = Self;
#[inline]
fn neg(self) -> Self { Wrapping(0) - self }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for &Wrapping<i16> {
type Output = <Wrapping<i16> as Neg>::Output;
#[inline]
fn neg(self) -> <Wrapping<i16> as Neg>::Output { Neg::neg(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add for Wrapping<i32> {
type Output = Wrapping<i32>;
#[inline]
fn add(self, other: Wrapping<i32>) -> Wrapping<i32> {
Wrapping(self.0.wrapping_add(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as Add<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: Wrapping<i32>)
-> <Wrapping<i32> as Add<Wrapping<i32>>>::Output {
Add::add(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<i32>> for Wrapping<i32> {
type Output = <Wrapping<i32> as Add<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as Add<Wrapping<i32>>>::Output {
Add::add(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as Add<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as Add<Wrapping<i32>>>::Output {
Add::add(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign for Wrapping<i32> {
#[inline]
fn add_assign(&mut self, other: Wrapping<i32>) { *self = *self + other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&Wrapping<i32>> for Wrapping<i32> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &Wrapping<i32>) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<i32> for Wrapping<i32> {
#[inline]
fn add_assign(&mut self, other: i32) { *self = *self + Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&i32> for Wrapping<i32> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &i32) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub for Wrapping<i32> {
type Output = Wrapping<i32>;
#[inline]
fn sub(self, other: Wrapping<i32>) -> Wrapping<i32> {
Wrapping(self.0.wrapping_sub(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as Sub<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: Wrapping<i32>)
-> <Wrapping<i32> as Sub<Wrapping<i32>>>::Output {
Sub::sub(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<i32>> for Wrapping<i32> {
type Output = <Wrapping<i32> as Sub<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as Sub<Wrapping<i32>>>::Output {
Sub::sub(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as Sub<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as Sub<Wrapping<i32>>>::Output {
Sub::sub(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign for Wrapping<i32> {
#[inline]
fn sub_assign(&mut self, other: Wrapping<i32>) { *self = *self - other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&Wrapping<i32>> for Wrapping<i32> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &Wrapping<i32>) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<i32> for Wrapping<i32> {
#[inline]
fn sub_assign(&mut self, other: i32) { *self = *self - Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&i32> for Wrapping<i32> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &i32) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul for Wrapping<i32> {
type Output = Wrapping<i32>;
#[inline]
fn mul(self, other: Wrapping<i32>) -> Wrapping<i32> {
Wrapping(self.0.wrapping_mul(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as Mul<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: Wrapping<i32>)
-> <Wrapping<i32> as Mul<Wrapping<i32>>>::Output {
Mul::mul(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<i32>> for Wrapping<i32> {
type Output = <Wrapping<i32> as Mul<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as Mul<Wrapping<i32>>>::Output {
Mul::mul(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as Mul<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as Mul<Wrapping<i32>>>::Output {
Mul::mul(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign for Wrapping<i32> {
#[inline]
fn mul_assign(&mut self, other: Wrapping<i32>) { *self = *self * other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&Wrapping<i32>> for Wrapping<i32> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &Wrapping<i32>) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<i32> for Wrapping<i32> {
#[inline]
fn mul_assign(&mut self, other: i32) { *self = *self * Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&i32> for Wrapping<i32> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &i32) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_div", since = "1.3.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div for Wrapping<i32> {
type Output = Wrapping<i32>;
#[inline]
fn div(self, other: Wrapping<i32>) -> Wrapping<i32> {
Wrapping(self.0.wrapping_div(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as Div<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: Wrapping<i32>)
-> <Wrapping<i32> as Div<Wrapping<i32>>>::Output {
Div::div(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<i32>> for Wrapping<i32> {
type Output = <Wrapping<i32> as Div<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as Div<Wrapping<i32>>>::Output {
Div::div(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as Div<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as Div<Wrapping<i32>>>::Output {
Div::div(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign for Wrapping<i32> {
#[inline]
fn div_assign(&mut self, other: Wrapping<i32>) { *self = *self / other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&Wrapping<i32>> for Wrapping<i32> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &Wrapping<i32>) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<i32> for Wrapping<i32> {
#[inline]
fn div_assign(&mut self, other: i32) { *self = *self / Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&i32> for Wrapping<i32> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &i32) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_impls", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem for Wrapping<i32> {
type Output = Wrapping<i32>;
#[inline]
fn rem(self, other: Wrapping<i32>) -> Wrapping<i32> {
Wrapping(self.0.wrapping_rem(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as Rem<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: Wrapping<i32>)
-> <Wrapping<i32> as Rem<Wrapping<i32>>>::Output {
Rem::rem(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<i32>> for Wrapping<i32> {
type Output = <Wrapping<i32> as Rem<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as Rem<Wrapping<i32>>>::Output {
Rem::rem(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as Rem<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as Rem<Wrapping<i32>>>::Output {
Rem::rem(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign for Wrapping<i32> {
#[inline]
fn rem_assign(&mut self, other: Wrapping<i32>) { *self = *self % other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&Wrapping<i32>> for Wrapping<i32> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &Wrapping<i32>) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<i32> for Wrapping<i32> {
#[inline]
fn rem_assign(&mut self, other: i32) { *self = *self % Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&i32> for Wrapping<i32> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &i32) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for Wrapping<i32> {
type Output = Wrapping<i32>;
#[inline]
fn not(self) -> Wrapping<i32> { Wrapping(!self.0) }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for &Wrapping<i32> {
type Output = <Wrapping<i32> as Not>::Output;
#[inline]
fn not(self) -> <Wrapping<i32> as Not>::Output { Not::not(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor for Wrapping<i32> {
type Output = Wrapping<i32>;
#[inline]
fn bitxor(self, other: Wrapping<i32>) -> Wrapping<i32> {
Wrapping(self.0 ^ other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as BitXor<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: Wrapping<i32>)
-> <Wrapping<i32> as BitXor<Wrapping<i32>>>::Output {
BitXor::bitxor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<i32>> for Wrapping<i32> {
type Output = <Wrapping<i32> as BitXor<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as BitXor<Wrapping<i32>>>::Output {
BitXor::bitxor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as BitXor<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as BitXor<Wrapping<i32>>>::Output {
BitXor::bitxor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign for Wrapping<i32> {
#[inline]
fn bitxor_assign(&mut self, other: Wrapping<i32>) {
*self = *self ^ other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&Wrapping<i32>> for Wrapping<i32> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &Wrapping<i32>) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<i32> for Wrapping<i32> {
#[inline]
fn bitxor_assign(&mut self, other: i32) {
*self = *self ^ Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&i32> for Wrapping<i32> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &i32) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr for Wrapping<i32> {
type Output = Wrapping<i32>;
#[inline]
fn bitor(self, other: Wrapping<i32>) -> Wrapping<i32> {
Wrapping(self.0 | other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as BitOr<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: Wrapping<i32>)
-> <Wrapping<i32> as BitOr<Wrapping<i32>>>::Output {
BitOr::bitor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<i32>> for Wrapping<i32> {
type Output = <Wrapping<i32> as BitOr<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as BitOr<Wrapping<i32>>>::Output {
BitOr::bitor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as BitOr<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as BitOr<Wrapping<i32>>>::Output {
BitOr::bitor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign for Wrapping<i32> {
#[inline]
fn bitor_assign(&mut self, other: Wrapping<i32>) {
*self = *self | other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&Wrapping<i32>> for Wrapping<i32> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &Wrapping<i32>) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<i32> for Wrapping<i32> {
#[inline]
fn bitor_assign(&mut self, other: i32) {
*self = *self | Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&i32> for Wrapping<i32> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &i32) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd for Wrapping<i32> {
type Output = Wrapping<i32>;
#[inline]
fn bitand(self, other: Wrapping<i32>) -> Wrapping<i32> {
Wrapping(self.0 & other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as BitAnd<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: Wrapping<i32>)
-> <Wrapping<i32> as BitAnd<Wrapping<i32>>>::Output {
BitAnd::bitand(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<i32>> for Wrapping<i32> {
type Output = <Wrapping<i32> as BitAnd<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as BitAnd<Wrapping<i32>>>::Output {
BitAnd::bitand(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<i32>> for &Wrapping<i32> {
type Output = <Wrapping<i32> as BitAnd<Wrapping<i32>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<i32>)
-> <Wrapping<i32> as BitAnd<Wrapping<i32>>>::Output {
BitAnd::bitand(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign for Wrapping<i32> {
#[inline]
fn bitand_assign(&mut self, other: Wrapping<i32>) {
*self = *self & other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&Wrapping<i32>> for Wrapping<i32> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &Wrapping<i32>) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<i32> for Wrapping<i32> {
#[inline]
fn bitand_assign(&mut self, other: i32) {
*self = *self & Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&i32> for Wrapping<i32> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &i32) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_neg", since = "1.10.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for Wrapping<i32> {
type Output = Self;
#[inline]
fn neg(self) -> Self { Wrapping(0) - self }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for &Wrapping<i32> {
type Output = <Wrapping<i32> as Neg>::Output;
#[inline]
fn neg(self) -> <Wrapping<i32> as Neg>::Output { Neg::neg(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add for Wrapping<i64> {
type Output = Wrapping<i64>;
#[inline]
fn add(self, other: Wrapping<i64>) -> Wrapping<i64> {
Wrapping(self.0.wrapping_add(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as Add<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: Wrapping<i64>)
-> <Wrapping<i64> as Add<Wrapping<i64>>>::Output {
Add::add(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<i64>> for Wrapping<i64> {
type Output = <Wrapping<i64> as Add<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as Add<Wrapping<i64>>>::Output {
Add::add(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as Add<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as Add<Wrapping<i64>>>::Output {
Add::add(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign for Wrapping<i64> {
#[inline]
fn add_assign(&mut self, other: Wrapping<i64>) { *self = *self + other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&Wrapping<i64>> for Wrapping<i64> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &Wrapping<i64>) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<i64> for Wrapping<i64> {
#[inline]
fn add_assign(&mut self, other: i64) { *self = *self + Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&i64> for Wrapping<i64> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &i64) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub for Wrapping<i64> {
type Output = Wrapping<i64>;
#[inline]
fn sub(self, other: Wrapping<i64>) -> Wrapping<i64> {
Wrapping(self.0.wrapping_sub(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as Sub<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: Wrapping<i64>)
-> <Wrapping<i64> as Sub<Wrapping<i64>>>::Output {
Sub::sub(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<i64>> for Wrapping<i64> {
type Output = <Wrapping<i64> as Sub<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as Sub<Wrapping<i64>>>::Output {
Sub::sub(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as Sub<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as Sub<Wrapping<i64>>>::Output {
Sub::sub(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign for Wrapping<i64> {
#[inline]
fn sub_assign(&mut self, other: Wrapping<i64>) { *self = *self - other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&Wrapping<i64>> for Wrapping<i64> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &Wrapping<i64>) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<i64> for Wrapping<i64> {
#[inline]
fn sub_assign(&mut self, other: i64) { *self = *self - Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&i64> for Wrapping<i64> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &i64) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul for Wrapping<i64> {
type Output = Wrapping<i64>;
#[inline]
fn mul(self, other: Wrapping<i64>) -> Wrapping<i64> {
Wrapping(self.0.wrapping_mul(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as Mul<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: Wrapping<i64>)
-> <Wrapping<i64> as Mul<Wrapping<i64>>>::Output {
Mul::mul(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<i64>> for Wrapping<i64> {
type Output = <Wrapping<i64> as Mul<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as Mul<Wrapping<i64>>>::Output {
Mul::mul(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as Mul<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as Mul<Wrapping<i64>>>::Output {
Mul::mul(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign for Wrapping<i64> {
#[inline]
fn mul_assign(&mut self, other: Wrapping<i64>) { *self = *self * other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&Wrapping<i64>> for Wrapping<i64> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &Wrapping<i64>) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<i64> for Wrapping<i64> {
#[inline]
fn mul_assign(&mut self, other: i64) { *self = *self * Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&i64> for Wrapping<i64> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &i64) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_div", since = "1.3.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div for Wrapping<i64> {
type Output = Wrapping<i64>;
#[inline]
fn div(self, other: Wrapping<i64>) -> Wrapping<i64> {
Wrapping(self.0.wrapping_div(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as Div<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: Wrapping<i64>)
-> <Wrapping<i64> as Div<Wrapping<i64>>>::Output {
Div::div(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<i64>> for Wrapping<i64> {
type Output = <Wrapping<i64> as Div<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as Div<Wrapping<i64>>>::Output {
Div::div(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as Div<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as Div<Wrapping<i64>>>::Output {
Div::div(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign for Wrapping<i64> {
#[inline]
fn div_assign(&mut self, other: Wrapping<i64>) { *self = *self / other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&Wrapping<i64>> for Wrapping<i64> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &Wrapping<i64>) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<i64> for Wrapping<i64> {
#[inline]
fn div_assign(&mut self, other: i64) { *self = *self / Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&i64> for Wrapping<i64> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &i64) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_impls", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem for Wrapping<i64> {
type Output = Wrapping<i64>;
#[inline]
fn rem(self, other: Wrapping<i64>) -> Wrapping<i64> {
Wrapping(self.0.wrapping_rem(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as Rem<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: Wrapping<i64>)
-> <Wrapping<i64> as Rem<Wrapping<i64>>>::Output {
Rem::rem(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<i64>> for Wrapping<i64> {
type Output = <Wrapping<i64> as Rem<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as Rem<Wrapping<i64>>>::Output {
Rem::rem(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as Rem<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as Rem<Wrapping<i64>>>::Output {
Rem::rem(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign for Wrapping<i64> {
#[inline]
fn rem_assign(&mut self, other: Wrapping<i64>) { *self = *self % other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&Wrapping<i64>> for Wrapping<i64> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &Wrapping<i64>) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<i64> for Wrapping<i64> {
#[inline]
fn rem_assign(&mut self, other: i64) { *self = *self % Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&i64> for Wrapping<i64> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &i64) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for Wrapping<i64> {
type Output = Wrapping<i64>;
#[inline]
fn not(self) -> Wrapping<i64> { Wrapping(!self.0) }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for &Wrapping<i64> {
type Output = <Wrapping<i64> as Not>::Output;
#[inline]
fn not(self) -> <Wrapping<i64> as Not>::Output { Not::not(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor for Wrapping<i64> {
type Output = Wrapping<i64>;
#[inline]
fn bitxor(self, other: Wrapping<i64>) -> Wrapping<i64> {
Wrapping(self.0 ^ other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as BitXor<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: Wrapping<i64>)
-> <Wrapping<i64> as BitXor<Wrapping<i64>>>::Output {
BitXor::bitxor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<i64>> for Wrapping<i64> {
type Output = <Wrapping<i64> as BitXor<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as BitXor<Wrapping<i64>>>::Output {
BitXor::bitxor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as BitXor<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as BitXor<Wrapping<i64>>>::Output {
BitXor::bitxor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign for Wrapping<i64> {
#[inline]
fn bitxor_assign(&mut self, other: Wrapping<i64>) {
*self = *self ^ other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&Wrapping<i64>> for Wrapping<i64> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &Wrapping<i64>) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<i64> for Wrapping<i64> {
#[inline]
fn bitxor_assign(&mut self, other: i64) {
*self = *self ^ Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&i64> for Wrapping<i64> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &i64) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr for Wrapping<i64> {
type Output = Wrapping<i64>;
#[inline]
fn bitor(self, other: Wrapping<i64>) -> Wrapping<i64> {
Wrapping(self.0 | other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as BitOr<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: Wrapping<i64>)
-> <Wrapping<i64> as BitOr<Wrapping<i64>>>::Output {
BitOr::bitor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<i64>> for Wrapping<i64> {
type Output = <Wrapping<i64> as BitOr<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as BitOr<Wrapping<i64>>>::Output {
BitOr::bitor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as BitOr<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as BitOr<Wrapping<i64>>>::Output {
BitOr::bitor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign for Wrapping<i64> {
#[inline]
fn bitor_assign(&mut self, other: Wrapping<i64>) {
*self = *self | other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&Wrapping<i64>> for Wrapping<i64> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &Wrapping<i64>) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<i64> for Wrapping<i64> {
#[inline]
fn bitor_assign(&mut self, other: i64) {
*self = *self | Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&i64> for Wrapping<i64> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &i64) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd for Wrapping<i64> {
type Output = Wrapping<i64>;
#[inline]
fn bitand(self, other: Wrapping<i64>) -> Wrapping<i64> {
Wrapping(self.0 & other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as BitAnd<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: Wrapping<i64>)
-> <Wrapping<i64> as BitAnd<Wrapping<i64>>>::Output {
BitAnd::bitand(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<i64>> for Wrapping<i64> {
type Output = <Wrapping<i64> as BitAnd<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as BitAnd<Wrapping<i64>>>::Output {
BitAnd::bitand(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<i64>> for &Wrapping<i64> {
type Output = <Wrapping<i64> as BitAnd<Wrapping<i64>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<i64>)
-> <Wrapping<i64> as BitAnd<Wrapping<i64>>>::Output {
BitAnd::bitand(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign for Wrapping<i64> {
#[inline]
fn bitand_assign(&mut self, other: Wrapping<i64>) {
*self = *self & other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&Wrapping<i64>> for Wrapping<i64> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &Wrapping<i64>) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<i64> for Wrapping<i64> {
#[inline]
fn bitand_assign(&mut self, other: i64) {
*self = *self & Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&i64> for Wrapping<i64> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &i64) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_neg", since = "1.10.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for Wrapping<i64> {
type Output = Self;
#[inline]
fn neg(self) -> Self { Wrapping(0) - self }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for &Wrapping<i64> {
type Output = <Wrapping<i64> as Neg>::Output;
#[inline]
fn neg(self) -> <Wrapping<i64> as Neg>::Output { Neg::neg(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add for Wrapping<i128> {
type Output = Wrapping<i128>;
#[inline]
fn add(self, other: Wrapping<i128>) -> Wrapping<i128> {
Wrapping(self.0.wrapping_add(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as Add<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: Wrapping<i128>)
-> <Wrapping<i128> as Add<Wrapping<i128>>>::Output {
Add::add(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<i128>> for Wrapping<i128> {
type Output = <Wrapping<i128> as Add<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as Add<Wrapping<i128>>>::Output {
Add::add(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Add<&Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as Add<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn add(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as Add<Wrapping<i128>>>::Output {
Add::add(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign for Wrapping<i128> {
#[inline]
fn add_assign(&mut self, other: Wrapping<i128>) { *self = *self + other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&Wrapping<i128>> for Wrapping<i128> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &Wrapping<i128>) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<i128> for Wrapping<i128> {
#[inline]
fn add_assign(&mut self, other: i128) { *self = *self + Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl AddAssign<&i128> for Wrapping<i128> {
#[inline]
#[track_caller]
fn add_assign(&mut self, other: &i128) {
AddAssign::add_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub for Wrapping<i128> {
type Output = Wrapping<i128>;
#[inline]
fn sub(self, other: Wrapping<i128>) -> Wrapping<i128> {
Wrapping(self.0.wrapping_sub(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as Sub<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: Wrapping<i128>)
-> <Wrapping<i128> as Sub<Wrapping<i128>>>::Output {
Sub::sub(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<i128>> for Wrapping<i128> {
type Output = <Wrapping<i128> as Sub<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as Sub<Wrapping<i128>>>::Output {
Sub::sub(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Sub<&Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as Sub<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn sub(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as Sub<Wrapping<i128>>>::Output {
Sub::sub(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign for Wrapping<i128> {
#[inline]
fn sub_assign(&mut self, other: Wrapping<i128>) { *self = *self - other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&Wrapping<i128>> for Wrapping<i128> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &Wrapping<i128>) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<i128> for Wrapping<i128> {
#[inline]
fn sub_assign(&mut self, other: i128) { *self = *self - Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl SubAssign<&i128> for Wrapping<i128> {
#[inline]
#[track_caller]
fn sub_assign(&mut self, other: &i128) {
SubAssign::sub_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul for Wrapping<i128> {
type Output = Wrapping<i128>;
#[inline]
fn mul(self, other: Wrapping<i128>) -> Wrapping<i128> {
Wrapping(self.0.wrapping_mul(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as Mul<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: Wrapping<i128>)
-> <Wrapping<i128> as Mul<Wrapping<i128>>>::Output {
Mul::mul(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<i128>> for Wrapping<i128> {
type Output = <Wrapping<i128> as Mul<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as Mul<Wrapping<i128>>>::Output {
Mul::mul(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Mul<&Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as Mul<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn mul(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as Mul<Wrapping<i128>>>::Output {
Mul::mul(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign for Wrapping<i128> {
#[inline]
fn mul_assign(&mut self, other: Wrapping<i128>) { *self = *self * other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&Wrapping<i128>> for Wrapping<i128> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &Wrapping<i128>) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<i128> for Wrapping<i128> {
#[inline]
fn mul_assign(&mut self, other: i128) { *self = *self * Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl MulAssign<&i128> for Wrapping<i128> {
#[inline]
#[track_caller]
fn mul_assign(&mut self, other: &i128) {
MulAssign::mul_assign(self, *other);
}
}
#[stable(feature = "wrapping_div", since = "1.3.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div for Wrapping<i128> {
type Output = Wrapping<i128>;
#[inline]
fn div(self, other: Wrapping<i128>) -> Wrapping<i128> {
Wrapping(self.0.wrapping_div(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as Div<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: Wrapping<i128>)
-> <Wrapping<i128> as Div<Wrapping<i128>>>::Output {
Div::div(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<i128>> for Wrapping<i128> {
type Output = <Wrapping<i128> as Div<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as Div<Wrapping<i128>>>::Output {
Div::div(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Div<&Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as Div<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn div(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as Div<Wrapping<i128>>>::Output {
Div::div(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign for Wrapping<i128> {
#[inline]
fn div_assign(&mut self, other: Wrapping<i128>) { *self = *self / other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&Wrapping<i128>> for Wrapping<i128> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &Wrapping<i128>) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<i128> for Wrapping<i128> {
#[inline]
fn div_assign(&mut self, other: i128) { *self = *self / Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl DivAssign<&i128> for Wrapping<i128> {
#[inline]
#[track_caller]
fn div_assign(&mut self, other: &i128) {
DivAssign::div_assign(self, *other);
}
}
#[stable(feature = "wrapping_impls", since = "1.7.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem for Wrapping<i128> {
type Output = Wrapping<i128>;
#[inline]
fn rem(self, other: Wrapping<i128>) -> Wrapping<i128> {
Wrapping(self.0.wrapping_rem(other.0))
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as Rem<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: Wrapping<i128>)
-> <Wrapping<i128> as Rem<Wrapping<i128>>>::Output {
Rem::rem(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<i128>> for Wrapping<i128> {
type Output = <Wrapping<i128> as Rem<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as Rem<Wrapping<i128>>>::Output {
Rem::rem(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Rem<&Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as Rem<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn rem(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as Rem<Wrapping<i128>>>::Output {
Rem::rem(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign for Wrapping<i128> {
#[inline]
fn rem_assign(&mut self, other: Wrapping<i128>) { *self = *self % other; }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&Wrapping<i128>> for Wrapping<i128> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &Wrapping<i128>) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<i128> for Wrapping<i128> {
#[inline]
fn rem_assign(&mut self, other: i128) { *self = *self % Wrapping(other); }
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl RemAssign<&i128> for Wrapping<i128> {
#[inline]
#[track_caller]
fn rem_assign(&mut self, other: &i128) {
RemAssign::rem_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for Wrapping<i128> {
type Output = Wrapping<i128>;
#[inline]
fn not(self) -> Wrapping<i128> { Wrapping(!self.0) }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Not for &Wrapping<i128> {
type Output = <Wrapping<i128> as Not>::Output;
#[inline]
fn not(self) -> <Wrapping<i128> as Not>::Output { Not::not(*self) }
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor for Wrapping<i128> {
type Output = Wrapping<i128>;
#[inline]
fn bitxor(self, other: Wrapping<i128>) -> Wrapping<i128> {
Wrapping(self.0 ^ other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as BitXor<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: Wrapping<i128>)
-> <Wrapping<i128> as BitXor<Wrapping<i128>>>::Output {
BitXor::bitxor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<i128>> for Wrapping<i128> {
type Output = <Wrapping<i128> as BitXor<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as BitXor<Wrapping<i128>>>::Output {
BitXor::bitxor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXor<&Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as BitXor<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn bitxor(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as BitXor<Wrapping<i128>>>::Output {
BitXor::bitxor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign for Wrapping<i128> {
#[inline]
fn bitxor_assign(&mut self, other: Wrapping<i128>) {
*self = *self ^ other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&Wrapping<i128>> for Wrapping<i128> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &Wrapping<i128>) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<i128> for Wrapping<i128> {
#[inline]
fn bitxor_assign(&mut self, other: i128) {
*self = *self ^ Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitXorAssign<&i128> for Wrapping<i128> {
#[inline]
#[track_caller]
fn bitxor_assign(&mut self, other: &i128) {
BitXorAssign::bitxor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr for Wrapping<i128> {
type Output = Wrapping<i128>;
#[inline]
fn bitor(self, other: Wrapping<i128>) -> Wrapping<i128> {
Wrapping(self.0 | other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as BitOr<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: Wrapping<i128>)
-> <Wrapping<i128> as BitOr<Wrapping<i128>>>::Output {
BitOr::bitor(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<i128>> for Wrapping<i128> {
type Output = <Wrapping<i128> as BitOr<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as BitOr<Wrapping<i128>>>::Output {
BitOr::bitor(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOr<&Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as BitOr<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn bitor(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as BitOr<Wrapping<i128>>>::Output {
BitOr::bitor(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign for Wrapping<i128> {
#[inline]
fn bitor_assign(&mut self, other: Wrapping<i128>) {
*self = *self | other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&Wrapping<i128>> for Wrapping<i128> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &Wrapping<i128>) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<i128> for Wrapping<i128> {
#[inline]
fn bitor_assign(&mut self, other: i128) {
*self = *self | Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitOrAssign<&i128> for Wrapping<i128> {
#[inline]
#[track_caller]
fn bitor_assign(&mut self, other: &i128) {
BitOrAssign::bitor_assign(self, *other);
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd for Wrapping<i128> {
type Output = Wrapping<i128>;
#[inline]
fn bitand(self, other: Wrapping<i128>) -> Wrapping<i128> {
Wrapping(self.0 & other.0)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as BitAnd<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: Wrapping<i128>)
-> <Wrapping<i128> as BitAnd<Wrapping<i128>>>::Output {
BitAnd::bitand(*self, other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<i128>> for Wrapping<i128> {
type Output = <Wrapping<i128> as BitAnd<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as BitAnd<Wrapping<i128>>>::Output {
BitAnd::bitand(self, *other)
}
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAnd<&Wrapping<i128>> for &Wrapping<i128> {
type Output = <Wrapping<i128> as BitAnd<Wrapping<i128>>>::Output;
#[inline]
#[track_caller]
fn bitand(self, other: &Wrapping<i128>)
-> <Wrapping<i128> as BitAnd<Wrapping<i128>>>::Output {
BitAnd::bitand(*self, *other)
}
}
#[stable(feature = "op_assign_traits", since = "1.8.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign for Wrapping<i128> {
#[inline]
fn bitand_assign(&mut self, other: Wrapping<i128>) {
*self = *self & other;
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&Wrapping<i128>> for Wrapping<i128> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &Wrapping<i128>) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_int_assign_impl", since = "1.60.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<i128> for Wrapping<i128> {
#[inline]
fn bitand_assign(&mut self, other: i128) {
*self = *self & Wrapping(other);
}
}
#[stable(feature = "op_assign_builtins_by_ref", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl BitAndAssign<&i128> for Wrapping<i128> {
#[inline]
#[track_caller]
fn bitand_assign(&mut self, other: &i128) {
BitAndAssign::bitand_assign(self, *other);
}
}
#[stable(feature = "wrapping_neg", since = "1.10.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for Wrapping<i128> {
type Output = Self;
#[inline]
fn neg(self) -> Self { Wrapping(0) - self }
}
#[stable(feature = "wrapping_ref", since = "1.14.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Neg for &Wrapping<i128> {
type Output = <Wrapping<i128> as Neg>::Output;
#[inline]
fn neg(self) -> <Wrapping<i128> as Neg>::Output { Neg::neg(*self) }
}wrapping_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
567
568macro_rules! wrapping_int_impl {
569 ($($t:ty)*) => ($(
570 impl Wrapping<$t> {
571 #[doc = concat!("assert_eq!(<Wrapping<", stringify!($t), ">>::MIN, Wrapping(", stringify!($t), "::MIN));")]
582 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
584 pub const MIN: Self = Self(<$t>::MIN);
585
586 #[doc = concat!("assert_eq!(<Wrapping<", stringify!($t), ">>::MAX, Wrapping(", stringify!($t), "::MAX));")]
597 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
599 pub const MAX: Self = Self(<$t>::MAX);
600
601 #[doc = concat!("assert_eq!(<Wrapping<", stringify!($t), ">>::BITS, ", stringify!($t), "::BITS);")]
612 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
614 pub const BITS: u32 = <$t>::BITS;
615
616 #[doc = concat!("let n = Wrapping(0b01001100", stringify!($t), ");")]
627 #[inline]
631 #[doc(alias = "popcount")]
632 #[doc(alias = "popcnt")]
633 #[must_use = "this returns the result of the operation, \
634 without modifying the original"]
635 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
636 pub const fn count_ones(self) -> u32 {
637 self.0.count_ones()
638 }
639
640 #[doc = concat!("assert_eq!(Wrapping(!0", stringify!($t), ").count_zeros(), 0);")]
651 #[inline]
653 #[must_use = "this returns the result of the operation, \
654 without modifying the original"]
655 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
656 pub const fn count_zeros(self) -> u32 {
657 self.0.count_zeros()
658 }
659
660 #[doc = concat!("let n = Wrapping(0b0101000", stringify!($t), ");")]
671 #[inline]
675 #[must_use = "this returns the result of the operation, \
676 without modifying the original"]
677 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
678 pub const fn trailing_zeros(self) -> u32 {
679 self.0.trailing_zeros()
680 }
681
682 #[inline]
703 #[must_use = "this returns the result of the operation, \
704 without modifying the original"]
705 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
706 pub const fn rotate_left(self, n: u32) -> Self {
707 Wrapping(self.0.rotate_left(n))
708 }
709
710 #[inline]
731 #[must_use = "this returns the result of the operation, \
732 without modifying the original"]
733 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
734 pub const fn rotate_right(self, n: u32) -> Self {
735 Wrapping(self.0.rotate_right(n))
736 }
737
738 #[inline]
757 #[must_use = "this returns the result of the operation, \
758 without modifying the original"]
759 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
760 pub const fn swap_bytes(self) -> Self {
761 Wrapping(self.0.swap_bytes())
762 }
763
764 #[stable(feature = "reverse_bits", since = "1.37.0")]
785 #[rustc_const_stable(feature = "const_reverse_bits", since = "1.37.0")]
786 #[must_use = "this returns the result of the operation, \
787 without modifying the original"]
788 #[inline]
789 pub const fn reverse_bits(self) -> Self {
790 Wrapping(self.0.reverse_bits())
791 }
792
793 #[doc = concat!("let n = Wrapping(0x1A", stringify!($t), ");")]
807 #[doc = concat!(" assert_eq!(<Wrapping<", stringify!($t), ">>::from_be(n), n)")]
810 #[doc = concat!(" assert_eq!(<Wrapping<", stringify!($t), ">>::from_be(n), n.swap_bytes())")]
812 #[inline]
815 #[must_use]
816 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
817 pub const fn from_be(x: Self) -> Self {
818 Wrapping(<$t>::from_be(x.0))
819 }
820
821 #[doc = concat!("let n = Wrapping(0x1A", stringify!($t), ");")]
835 #[doc = concat!(" assert_eq!(<Wrapping<", stringify!($t), ">>::from_le(n), n)")]
838 #[doc = concat!(" assert_eq!(<Wrapping<", stringify!($t), ">>::from_le(n), n.swap_bytes())")]
840 #[inline]
843 #[must_use]
844 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
845 pub const fn from_le(x: Self) -> Self {
846 Wrapping(<$t>::from_le(x.0))
847 }
848
849 #[doc = concat!("let n = Wrapping(0x1A", stringify!($t), ");")]
863 #[inline]
871 #[must_use = "this returns the result of the operation, \
872 without modifying the original"]
873 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
874 pub const fn to_be(self) -> Self {
875 Wrapping(self.0.to_be())
876 }
877
878 #[doc = concat!("let n = Wrapping(0x1A", stringify!($t), ");")]
892 #[inline]
900 #[must_use = "this returns the result of the operation, \
901 without modifying the original"]
902 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
903 pub const fn to_le(self) -> Self {
904 Wrapping(self.0.to_le())
905 }
906
907 #[doc = concat!("assert_eq!(Wrapping(3", stringify!($t), ").pow(4), Wrapping(81));")]
918 #[inline]
930 #[must_use = "this returns the result of the operation, \
931 without modifying the original"]
932 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
933 pub fn pow(self, exp: u32) -> Self {
934 Wrapping(self.0.wrapping_pow(exp))
935 }
936 }
937 )*)
938}
939
940impl Wrapping<usize> {
#[doc = "assert_eq!(<Wrapping<usize>>::MIN, Wrapping(usize::MIN));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MIN: Self = Self(<usize>::MIN);
#[doc = "assert_eq!(<Wrapping<usize>>::MAX, Wrapping(usize::MAX));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MAX: Self = Self(<usize>::MAX);
#[doc = "assert_eq!(<Wrapping<usize>>::BITS, usize::BITS);"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const BITS: u32 = <usize>::BITS;
#[doc = "let n = Wrapping(0b01001100usize);"]
#[inline]
#[doc(alias = "popcount")]
#[doc(alias = "popcnt")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_ones(self) -> u32 { self.0.count_ones() }
#[doc = "assert_eq!(Wrapping(!0usize).count_zeros(), 0);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_zeros(self) -> u32 { self.0.count_zeros() }
#[doc = "let n = Wrapping(0b0101000usize);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn trailing_zeros(self) -> u32 { self.0.trailing_zeros() }
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_left(self, n: u32) -> Self {
Wrapping(self.0.rotate_left(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_right(self, n: u32) -> Self {
Wrapping(self.0.rotate_right(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn swap_bytes(self) -> Self { Wrapping(self.0.swap_bytes()) }
#[stable(feature = "reverse_bits", since = "1.37.0")]
#[rustc_const_stable(feature = "const_reverse_bits", since = "1.37.0")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[inline]
pub const fn reverse_bits(self) -> Self {
Wrapping(self.0.reverse_bits())
}
#[doc = "let n = Wrapping(0x1Ausize);"]
#[doc = " assert_eq!(<Wrapping<usize>>::from_be(n), n)"]
#[doc = " assert_eq!(<Wrapping<usize>>::from_be(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_be(x: Self) -> Self { Wrapping(<usize>::from_be(x.0)) }
#[doc = "let n = Wrapping(0x1Ausize);"]
#[doc = " assert_eq!(<Wrapping<usize>>::from_le(n), n)"]
#[doc = " assert_eq!(<Wrapping<usize>>::from_le(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_le(x: Self) -> Self { Wrapping(<usize>::from_le(x.0)) }
#[doc = "let n = Wrapping(0x1Ausize);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_be(self) -> Self { Wrapping(self.0.to_be()) }
#[doc = "let n = Wrapping(0x1Ausize);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_le(self) -> Self { Wrapping(self.0.to_le()) }
#[doc = "assert_eq!(Wrapping(3usize).pow(4), Wrapping(81));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn pow(self, exp: u32) -> Self { Wrapping(self.0.wrapping_pow(exp)) }
}
impl Wrapping<u8> {
#[doc = "assert_eq!(<Wrapping<u8>>::MIN, Wrapping(u8::MIN));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MIN: Self = Self(<u8>::MIN);
#[doc = "assert_eq!(<Wrapping<u8>>::MAX, Wrapping(u8::MAX));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MAX: Self = Self(<u8>::MAX);
#[doc = "assert_eq!(<Wrapping<u8>>::BITS, u8::BITS);"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const BITS: u32 = <u8>::BITS;
#[doc = "let n = Wrapping(0b01001100u8);"]
#[inline]
#[doc(alias = "popcount")]
#[doc(alias = "popcnt")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_ones(self) -> u32 { self.0.count_ones() }
#[doc = "assert_eq!(Wrapping(!0u8).count_zeros(), 0);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_zeros(self) -> u32 { self.0.count_zeros() }
#[doc = "let n = Wrapping(0b0101000u8);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn trailing_zeros(self) -> u32 { self.0.trailing_zeros() }
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_left(self, n: u32) -> Self {
Wrapping(self.0.rotate_left(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_right(self, n: u32) -> Self {
Wrapping(self.0.rotate_right(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn swap_bytes(self) -> Self { Wrapping(self.0.swap_bytes()) }
#[stable(feature = "reverse_bits", since = "1.37.0")]
#[rustc_const_stable(feature = "const_reverse_bits", since = "1.37.0")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[inline]
pub const fn reverse_bits(self) -> Self {
Wrapping(self.0.reverse_bits())
}
#[doc = "let n = Wrapping(0x1Au8);"]
#[doc = " assert_eq!(<Wrapping<u8>>::from_be(n), n)"]
#[doc = " assert_eq!(<Wrapping<u8>>::from_be(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_be(x: Self) -> Self { Wrapping(<u8>::from_be(x.0)) }
#[doc = "let n = Wrapping(0x1Au8);"]
#[doc = " assert_eq!(<Wrapping<u8>>::from_le(n), n)"]
#[doc = " assert_eq!(<Wrapping<u8>>::from_le(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_le(x: Self) -> Self { Wrapping(<u8>::from_le(x.0)) }
#[doc = "let n = Wrapping(0x1Au8);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_be(self) -> Self { Wrapping(self.0.to_be()) }
#[doc = "let n = Wrapping(0x1Au8);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_le(self) -> Self { Wrapping(self.0.to_le()) }
#[doc = "assert_eq!(Wrapping(3u8).pow(4), Wrapping(81));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn pow(self, exp: u32) -> Self { Wrapping(self.0.wrapping_pow(exp)) }
}
impl Wrapping<u16> {
#[doc = "assert_eq!(<Wrapping<u16>>::MIN, Wrapping(u16::MIN));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MIN: Self = Self(<u16>::MIN);
#[doc = "assert_eq!(<Wrapping<u16>>::MAX, Wrapping(u16::MAX));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MAX: Self = Self(<u16>::MAX);
#[doc = "assert_eq!(<Wrapping<u16>>::BITS, u16::BITS);"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const BITS: u32 = <u16>::BITS;
#[doc = "let n = Wrapping(0b01001100u16);"]
#[inline]
#[doc(alias = "popcount")]
#[doc(alias = "popcnt")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_ones(self) -> u32 { self.0.count_ones() }
#[doc = "assert_eq!(Wrapping(!0u16).count_zeros(), 0);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_zeros(self) -> u32 { self.0.count_zeros() }
#[doc = "let n = Wrapping(0b0101000u16);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn trailing_zeros(self) -> u32 { self.0.trailing_zeros() }
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_left(self, n: u32) -> Self {
Wrapping(self.0.rotate_left(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_right(self, n: u32) -> Self {
Wrapping(self.0.rotate_right(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn swap_bytes(self) -> Self { Wrapping(self.0.swap_bytes()) }
#[stable(feature = "reverse_bits", since = "1.37.0")]
#[rustc_const_stable(feature = "const_reverse_bits", since = "1.37.0")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[inline]
pub const fn reverse_bits(self) -> Self {
Wrapping(self.0.reverse_bits())
}
#[doc = "let n = Wrapping(0x1Au16);"]
#[doc = " assert_eq!(<Wrapping<u16>>::from_be(n), n)"]
#[doc = " assert_eq!(<Wrapping<u16>>::from_be(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_be(x: Self) -> Self { Wrapping(<u16>::from_be(x.0)) }
#[doc = "let n = Wrapping(0x1Au16);"]
#[doc = " assert_eq!(<Wrapping<u16>>::from_le(n), n)"]
#[doc = " assert_eq!(<Wrapping<u16>>::from_le(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_le(x: Self) -> Self { Wrapping(<u16>::from_le(x.0)) }
#[doc = "let n = Wrapping(0x1Au16);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_be(self) -> Self { Wrapping(self.0.to_be()) }
#[doc = "let n = Wrapping(0x1Au16);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_le(self) -> Self { Wrapping(self.0.to_le()) }
#[doc = "assert_eq!(Wrapping(3u16).pow(4), Wrapping(81));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn pow(self, exp: u32) -> Self { Wrapping(self.0.wrapping_pow(exp)) }
}
impl Wrapping<u32> {
#[doc = "assert_eq!(<Wrapping<u32>>::MIN, Wrapping(u32::MIN));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MIN: Self = Self(<u32>::MIN);
#[doc = "assert_eq!(<Wrapping<u32>>::MAX, Wrapping(u32::MAX));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MAX: Self = Self(<u32>::MAX);
#[doc = "assert_eq!(<Wrapping<u32>>::BITS, u32::BITS);"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const BITS: u32 = <u32>::BITS;
#[doc = "let n = Wrapping(0b01001100u32);"]
#[inline]
#[doc(alias = "popcount")]
#[doc(alias = "popcnt")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_ones(self) -> u32 { self.0.count_ones() }
#[doc = "assert_eq!(Wrapping(!0u32).count_zeros(), 0);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_zeros(self) -> u32 { self.0.count_zeros() }
#[doc = "let n = Wrapping(0b0101000u32);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn trailing_zeros(self) -> u32 { self.0.trailing_zeros() }
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_left(self, n: u32) -> Self {
Wrapping(self.0.rotate_left(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_right(self, n: u32) -> Self {
Wrapping(self.0.rotate_right(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn swap_bytes(self) -> Self { Wrapping(self.0.swap_bytes()) }
#[stable(feature = "reverse_bits", since = "1.37.0")]
#[rustc_const_stable(feature = "const_reverse_bits", since = "1.37.0")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[inline]
pub const fn reverse_bits(self) -> Self {
Wrapping(self.0.reverse_bits())
}
#[doc = "let n = Wrapping(0x1Au32);"]
#[doc = " assert_eq!(<Wrapping<u32>>::from_be(n), n)"]
#[doc = " assert_eq!(<Wrapping<u32>>::from_be(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_be(x: Self) -> Self { Wrapping(<u32>::from_be(x.0)) }
#[doc = "let n = Wrapping(0x1Au32);"]
#[doc = " assert_eq!(<Wrapping<u32>>::from_le(n), n)"]
#[doc = " assert_eq!(<Wrapping<u32>>::from_le(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_le(x: Self) -> Self { Wrapping(<u32>::from_le(x.0)) }
#[doc = "let n = Wrapping(0x1Au32);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_be(self) -> Self { Wrapping(self.0.to_be()) }
#[doc = "let n = Wrapping(0x1Au32);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_le(self) -> Self { Wrapping(self.0.to_le()) }
#[doc = "assert_eq!(Wrapping(3u32).pow(4), Wrapping(81));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn pow(self, exp: u32) -> Self { Wrapping(self.0.wrapping_pow(exp)) }
}
impl Wrapping<u64> {
#[doc = "assert_eq!(<Wrapping<u64>>::MIN, Wrapping(u64::MIN));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MIN: Self = Self(<u64>::MIN);
#[doc = "assert_eq!(<Wrapping<u64>>::MAX, Wrapping(u64::MAX));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MAX: Self = Self(<u64>::MAX);
#[doc = "assert_eq!(<Wrapping<u64>>::BITS, u64::BITS);"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const BITS: u32 = <u64>::BITS;
#[doc = "let n = Wrapping(0b01001100u64);"]
#[inline]
#[doc(alias = "popcount")]
#[doc(alias = "popcnt")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_ones(self) -> u32 { self.0.count_ones() }
#[doc = "assert_eq!(Wrapping(!0u64).count_zeros(), 0);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_zeros(self) -> u32 { self.0.count_zeros() }
#[doc = "let n = Wrapping(0b0101000u64);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn trailing_zeros(self) -> u32 { self.0.trailing_zeros() }
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_left(self, n: u32) -> Self {
Wrapping(self.0.rotate_left(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_right(self, n: u32) -> Self {
Wrapping(self.0.rotate_right(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn swap_bytes(self) -> Self { Wrapping(self.0.swap_bytes()) }
#[stable(feature = "reverse_bits", since = "1.37.0")]
#[rustc_const_stable(feature = "const_reverse_bits", since = "1.37.0")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[inline]
pub const fn reverse_bits(self) -> Self {
Wrapping(self.0.reverse_bits())
}
#[doc = "let n = Wrapping(0x1Au64);"]
#[doc = " assert_eq!(<Wrapping<u64>>::from_be(n), n)"]
#[doc = " assert_eq!(<Wrapping<u64>>::from_be(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_be(x: Self) -> Self { Wrapping(<u64>::from_be(x.0)) }
#[doc = "let n = Wrapping(0x1Au64);"]
#[doc = " assert_eq!(<Wrapping<u64>>::from_le(n), n)"]
#[doc = " assert_eq!(<Wrapping<u64>>::from_le(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_le(x: Self) -> Self { Wrapping(<u64>::from_le(x.0)) }
#[doc = "let n = Wrapping(0x1Au64);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_be(self) -> Self { Wrapping(self.0.to_be()) }
#[doc = "let n = Wrapping(0x1Au64);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_le(self) -> Self { Wrapping(self.0.to_le()) }
#[doc = "assert_eq!(Wrapping(3u64).pow(4), Wrapping(81));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn pow(self, exp: u32) -> Self { Wrapping(self.0.wrapping_pow(exp)) }
}
impl Wrapping<u128> {
#[doc = "assert_eq!(<Wrapping<u128>>::MIN, Wrapping(u128::MIN));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MIN: Self = Self(<u128>::MIN);
#[doc = "assert_eq!(<Wrapping<u128>>::MAX, Wrapping(u128::MAX));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MAX: Self = Self(<u128>::MAX);
#[doc = "assert_eq!(<Wrapping<u128>>::BITS, u128::BITS);"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const BITS: u32 = <u128>::BITS;
#[doc = "let n = Wrapping(0b01001100u128);"]
#[inline]
#[doc(alias = "popcount")]
#[doc(alias = "popcnt")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_ones(self) -> u32 { self.0.count_ones() }
#[doc = "assert_eq!(Wrapping(!0u128).count_zeros(), 0);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_zeros(self) -> u32 { self.0.count_zeros() }
#[doc = "let n = Wrapping(0b0101000u128);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn trailing_zeros(self) -> u32 { self.0.trailing_zeros() }
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_left(self, n: u32) -> Self {
Wrapping(self.0.rotate_left(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_right(self, n: u32) -> Self {
Wrapping(self.0.rotate_right(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn swap_bytes(self) -> Self { Wrapping(self.0.swap_bytes()) }
#[stable(feature = "reverse_bits", since = "1.37.0")]
#[rustc_const_stable(feature = "const_reverse_bits", since = "1.37.0")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[inline]
pub const fn reverse_bits(self) -> Self {
Wrapping(self.0.reverse_bits())
}
#[doc = "let n = Wrapping(0x1Au128);"]
#[doc = " assert_eq!(<Wrapping<u128>>::from_be(n), n)"]
#[doc = " assert_eq!(<Wrapping<u128>>::from_be(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_be(x: Self) -> Self { Wrapping(<u128>::from_be(x.0)) }
#[doc = "let n = Wrapping(0x1Au128);"]
#[doc = " assert_eq!(<Wrapping<u128>>::from_le(n), n)"]
#[doc = " assert_eq!(<Wrapping<u128>>::from_le(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_le(x: Self) -> Self { Wrapping(<u128>::from_le(x.0)) }
#[doc = "let n = Wrapping(0x1Au128);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_be(self) -> Self { Wrapping(self.0.to_be()) }
#[doc = "let n = Wrapping(0x1Au128);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_le(self) -> Self { Wrapping(self.0.to_le()) }
#[doc = "assert_eq!(Wrapping(3u128).pow(4), Wrapping(81));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn pow(self, exp: u32) -> Self { Wrapping(self.0.wrapping_pow(exp)) }
}
impl Wrapping<isize> {
#[doc = "assert_eq!(<Wrapping<isize>>::MIN, Wrapping(isize::MIN));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MIN: Self = Self(<isize>::MIN);
#[doc = "assert_eq!(<Wrapping<isize>>::MAX, Wrapping(isize::MAX));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MAX: Self = Self(<isize>::MAX);
#[doc = "assert_eq!(<Wrapping<isize>>::BITS, isize::BITS);"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const BITS: u32 = <isize>::BITS;
#[doc = "let n = Wrapping(0b01001100isize);"]
#[inline]
#[doc(alias = "popcount")]
#[doc(alias = "popcnt")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_ones(self) -> u32 { self.0.count_ones() }
#[doc = "assert_eq!(Wrapping(!0isize).count_zeros(), 0);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_zeros(self) -> u32 { self.0.count_zeros() }
#[doc = "let n = Wrapping(0b0101000isize);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn trailing_zeros(self) -> u32 { self.0.trailing_zeros() }
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_left(self, n: u32) -> Self {
Wrapping(self.0.rotate_left(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_right(self, n: u32) -> Self {
Wrapping(self.0.rotate_right(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn swap_bytes(self) -> Self { Wrapping(self.0.swap_bytes()) }
#[stable(feature = "reverse_bits", since = "1.37.0")]
#[rustc_const_stable(feature = "const_reverse_bits", since = "1.37.0")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[inline]
pub const fn reverse_bits(self) -> Self {
Wrapping(self.0.reverse_bits())
}
#[doc = "let n = Wrapping(0x1Aisize);"]
#[doc = " assert_eq!(<Wrapping<isize>>::from_be(n), n)"]
#[doc = " assert_eq!(<Wrapping<isize>>::from_be(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_be(x: Self) -> Self { Wrapping(<isize>::from_be(x.0)) }
#[doc = "let n = Wrapping(0x1Aisize);"]
#[doc = " assert_eq!(<Wrapping<isize>>::from_le(n), n)"]
#[doc = " assert_eq!(<Wrapping<isize>>::from_le(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_le(x: Self) -> Self { Wrapping(<isize>::from_le(x.0)) }
#[doc = "let n = Wrapping(0x1Aisize);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_be(self) -> Self { Wrapping(self.0.to_be()) }
#[doc = "let n = Wrapping(0x1Aisize);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_le(self) -> Self { Wrapping(self.0.to_le()) }
#[doc = "assert_eq!(Wrapping(3isize).pow(4), Wrapping(81));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn pow(self, exp: u32) -> Self { Wrapping(self.0.wrapping_pow(exp)) }
}
impl Wrapping<i8> {
#[doc = "assert_eq!(<Wrapping<i8>>::MIN, Wrapping(i8::MIN));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MIN: Self = Self(<i8>::MIN);
#[doc = "assert_eq!(<Wrapping<i8>>::MAX, Wrapping(i8::MAX));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MAX: Self = Self(<i8>::MAX);
#[doc = "assert_eq!(<Wrapping<i8>>::BITS, i8::BITS);"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const BITS: u32 = <i8>::BITS;
#[doc = "let n = Wrapping(0b01001100i8);"]
#[inline]
#[doc(alias = "popcount")]
#[doc(alias = "popcnt")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_ones(self) -> u32 { self.0.count_ones() }
#[doc = "assert_eq!(Wrapping(!0i8).count_zeros(), 0);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_zeros(self) -> u32 { self.0.count_zeros() }
#[doc = "let n = Wrapping(0b0101000i8);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn trailing_zeros(self) -> u32 { self.0.trailing_zeros() }
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_left(self, n: u32) -> Self {
Wrapping(self.0.rotate_left(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_right(self, n: u32) -> Self {
Wrapping(self.0.rotate_right(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn swap_bytes(self) -> Self { Wrapping(self.0.swap_bytes()) }
#[stable(feature = "reverse_bits", since = "1.37.0")]
#[rustc_const_stable(feature = "const_reverse_bits", since = "1.37.0")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[inline]
pub const fn reverse_bits(self) -> Self {
Wrapping(self.0.reverse_bits())
}
#[doc = "let n = Wrapping(0x1Ai8);"]
#[doc = " assert_eq!(<Wrapping<i8>>::from_be(n), n)"]
#[doc = " assert_eq!(<Wrapping<i8>>::from_be(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_be(x: Self) -> Self { Wrapping(<i8>::from_be(x.0)) }
#[doc = "let n = Wrapping(0x1Ai8);"]
#[doc = " assert_eq!(<Wrapping<i8>>::from_le(n), n)"]
#[doc = " assert_eq!(<Wrapping<i8>>::from_le(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_le(x: Self) -> Self { Wrapping(<i8>::from_le(x.0)) }
#[doc = "let n = Wrapping(0x1Ai8);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_be(self) -> Self { Wrapping(self.0.to_be()) }
#[doc = "let n = Wrapping(0x1Ai8);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_le(self) -> Self { Wrapping(self.0.to_le()) }
#[doc = "assert_eq!(Wrapping(3i8).pow(4), Wrapping(81));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn pow(self, exp: u32) -> Self { Wrapping(self.0.wrapping_pow(exp)) }
}
impl Wrapping<i16> {
#[doc = "assert_eq!(<Wrapping<i16>>::MIN, Wrapping(i16::MIN));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MIN: Self = Self(<i16>::MIN);
#[doc = "assert_eq!(<Wrapping<i16>>::MAX, Wrapping(i16::MAX));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MAX: Self = Self(<i16>::MAX);
#[doc = "assert_eq!(<Wrapping<i16>>::BITS, i16::BITS);"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const BITS: u32 = <i16>::BITS;
#[doc = "let n = Wrapping(0b01001100i16);"]
#[inline]
#[doc(alias = "popcount")]
#[doc(alias = "popcnt")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_ones(self) -> u32 { self.0.count_ones() }
#[doc = "assert_eq!(Wrapping(!0i16).count_zeros(), 0);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_zeros(self) -> u32 { self.0.count_zeros() }
#[doc = "let n = Wrapping(0b0101000i16);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn trailing_zeros(self) -> u32 { self.0.trailing_zeros() }
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_left(self, n: u32) -> Self {
Wrapping(self.0.rotate_left(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_right(self, n: u32) -> Self {
Wrapping(self.0.rotate_right(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn swap_bytes(self) -> Self { Wrapping(self.0.swap_bytes()) }
#[stable(feature = "reverse_bits", since = "1.37.0")]
#[rustc_const_stable(feature = "const_reverse_bits", since = "1.37.0")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[inline]
pub const fn reverse_bits(self) -> Self {
Wrapping(self.0.reverse_bits())
}
#[doc = "let n = Wrapping(0x1Ai16);"]
#[doc = " assert_eq!(<Wrapping<i16>>::from_be(n), n)"]
#[doc = " assert_eq!(<Wrapping<i16>>::from_be(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_be(x: Self) -> Self { Wrapping(<i16>::from_be(x.0)) }
#[doc = "let n = Wrapping(0x1Ai16);"]
#[doc = " assert_eq!(<Wrapping<i16>>::from_le(n), n)"]
#[doc = " assert_eq!(<Wrapping<i16>>::from_le(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_le(x: Self) -> Self { Wrapping(<i16>::from_le(x.0)) }
#[doc = "let n = Wrapping(0x1Ai16);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_be(self) -> Self { Wrapping(self.0.to_be()) }
#[doc = "let n = Wrapping(0x1Ai16);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_le(self) -> Self { Wrapping(self.0.to_le()) }
#[doc = "assert_eq!(Wrapping(3i16).pow(4), Wrapping(81));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn pow(self, exp: u32) -> Self { Wrapping(self.0.wrapping_pow(exp)) }
}
impl Wrapping<i32> {
#[doc = "assert_eq!(<Wrapping<i32>>::MIN, Wrapping(i32::MIN));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MIN: Self = Self(<i32>::MIN);
#[doc = "assert_eq!(<Wrapping<i32>>::MAX, Wrapping(i32::MAX));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MAX: Self = Self(<i32>::MAX);
#[doc = "assert_eq!(<Wrapping<i32>>::BITS, i32::BITS);"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const BITS: u32 = <i32>::BITS;
#[doc = "let n = Wrapping(0b01001100i32);"]
#[inline]
#[doc(alias = "popcount")]
#[doc(alias = "popcnt")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_ones(self) -> u32 { self.0.count_ones() }
#[doc = "assert_eq!(Wrapping(!0i32).count_zeros(), 0);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_zeros(self) -> u32 { self.0.count_zeros() }
#[doc = "let n = Wrapping(0b0101000i32);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn trailing_zeros(self) -> u32 { self.0.trailing_zeros() }
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_left(self, n: u32) -> Self {
Wrapping(self.0.rotate_left(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_right(self, n: u32) -> Self {
Wrapping(self.0.rotate_right(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn swap_bytes(self) -> Self { Wrapping(self.0.swap_bytes()) }
#[stable(feature = "reverse_bits", since = "1.37.0")]
#[rustc_const_stable(feature = "const_reverse_bits", since = "1.37.0")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[inline]
pub const fn reverse_bits(self) -> Self {
Wrapping(self.0.reverse_bits())
}
#[doc = "let n = Wrapping(0x1Ai32);"]
#[doc = " assert_eq!(<Wrapping<i32>>::from_be(n), n)"]
#[doc = " assert_eq!(<Wrapping<i32>>::from_be(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_be(x: Self) -> Self { Wrapping(<i32>::from_be(x.0)) }
#[doc = "let n = Wrapping(0x1Ai32);"]
#[doc = " assert_eq!(<Wrapping<i32>>::from_le(n), n)"]
#[doc = " assert_eq!(<Wrapping<i32>>::from_le(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_le(x: Self) -> Self { Wrapping(<i32>::from_le(x.0)) }
#[doc = "let n = Wrapping(0x1Ai32);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_be(self) -> Self { Wrapping(self.0.to_be()) }
#[doc = "let n = Wrapping(0x1Ai32);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_le(self) -> Self { Wrapping(self.0.to_le()) }
#[doc = "assert_eq!(Wrapping(3i32).pow(4), Wrapping(81));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn pow(self, exp: u32) -> Self { Wrapping(self.0.wrapping_pow(exp)) }
}
impl Wrapping<i64> {
#[doc = "assert_eq!(<Wrapping<i64>>::MIN, Wrapping(i64::MIN));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MIN: Self = Self(<i64>::MIN);
#[doc = "assert_eq!(<Wrapping<i64>>::MAX, Wrapping(i64::MAX));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MAX: Self = Self(<i64>::MAX);
#[doc = "assert_eq!(<Wrapping<i64>>::BITS, i64::BITS);"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const BITS: u32 = <i64>::BITS;
#[doc = "let n = Wrapping(0b01001100i64);"]
#[inline]
#[doc(alias = "popcount")]
#[doc(alias = "popcnt")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_ones(self) -> u32 { self.0.count_ones() }
#[doc = "assert_eq!(Wrapping(!0i64).count_zeros(), 0);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_zeros(self) -> u32 { self.0.count_zeros() }
#[doc = "let n = Wrapping(0b0101000i64);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn trailing_zeros(self) -> u32 { self.0.trailing_zeros() }
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_left(self, n: u32) -> Self {
Wrapping(self.0.rotate_left(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_right(self, n: u32) -> Self {
Wrapping(self.0.rotate_right(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn swap_bytes(self) -> Self { Wrapping(self.0.swap_bytes()) }
#[stable(feature = "reverse_bits", since = "1.37.0")]
#[rustc_const_stable(feature = "const_reverse_bits", since = "1.37.0")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[inline]
pub const fn reverse_bits(self) -> Self {
Wrapping(self.0.reverse_bits())
}
#[doc = "let n = Wrapping(0x1Ai64);"]
#[doc = " assert_eq!(<Wrapping<i64>>::from_be(n), n)"]
#[doc = " assert_eq!(<Wrapping<i64>>::from_be(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_be(x: Self) -> Self { Wrapping(<i64>::from_be(x.0)) }
#[doc = "let n = Wrapping(0x1Ai64);"]
#[doc = " assert_eq!(<Wrapping<i64>>::from_le(n), n)"]
#[doc = " assert_eq!(<Wrapping<i64>>::from_le(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_le(x: Self) -> Self { Wrapping(<i64>::from_le(x.0)) }
#[doc = "let n = Wrapping(0x1Ai64);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_be(self) -> Self { Wrapping(self.0.to_be()) }
#[doc = "let n = Wrapping(0x1Ai64);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_le(self) -> Self { Wrapping(self.0.to_le()) }
#[doc = "assert_eq!(Wrapping(3i64).pow(4), Wrapping(81));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn pow(self, exp: u32) -> Self { Wrapping(self.0.wrapping_pow(exp)) }
}
impl Wrapping<i128> {
#[doc = "assert_eq!(<Wrapping<i128>>::MIN, Wrapping(i128::MIN));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MIN: Self = Self(<i128>::MIN);
#[doc = "assert_eq!(<Wrapping<i128>>::MAX, Wrapping(i128::MAX));"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const MAX: Self = Self(<i128>::MAX);
#[doc = "assert_eq!(<Wrapping<i128>>::BITS, i128::BITS);"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const BITS: u32 = <i128>::BITS;
#[doc = "let n = Wrapping(0b01001100i128);"]
#[inline]
#[doc(alias = "popcount")]
#[doc(alias = "popcnt")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_ones(self) -> u32 { self.0.count_ones() }
#[doc = "assert_eq!(Wrapping(!0i128).count_zeros(), 0);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn count_zeros(self) -> u32 { self.0.count_zeros() }
#[doc = "let n = Wrapping(0b0101000i128);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn trailing_zeros(self) -> u32 { self.0.trailing_zeros() }
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_left(self, n: u32) -> Self {
Wrapping(self.0.rotate_left(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn rotate_right(self, n: u32) -> Self {
Wrapping(self.0.rotate_right(n))
}
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn swap_bytes(self) -> Self { Wrapping(self.0.swap_bytes()) }
#[stable(feature = "reverse_bits", since = "1.37.0")]
#[rustc_const_stable(feature = "const_reverse_bits", since = "1.37.0")]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[inline]
pub const fn reverse_bits(self) -> Self {
Wrapping(self.0.reverse_bits())
}
#[doc = "let n = Wrapping(0x1Ai128);"]
#[doc = " assert_eq!(<Wrapping<i128>>::from_be(n), n)"]
#[doc = " assert_eq!(<Wrapping<i128>>::from_be(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_be(x: Self) -> Self { Wrapping(<i128>::from_be(x.0)) }
#[doc = "let n = Wrapping(0x1Ai128);"]
#[doc = " assert_eq!(<Wrapping<i128>>::from_le(n), n)"]
#[doc = " assert_eq!(<Wrapping<i128>>::from_le(n), n.swap_bytes())"]
#[inline]
#[must_use]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn from_le(x: Self) -> Self { Wrapping(<i128>::from_le(x.0)) }
#[doc = "let n = Wrapping(0x1Ai128);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_be(self) -> Self { Wrapping(self.0.to_be()) }
#[doc = "let n = Wrapping(0x1Ai128);"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn to_le(self) -> Self { Wrapping(self.0.to_le()) }
#[doc = "assert_eq!(Wrapping(3i128).pow(4), Wrapping(81));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn pow(self, exp: u32) -> Self { Wrapping(self.0.wrapping_pow(exp)) }
}wrapping_int_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
941
942macro_rules! wrapping_int_impl_signed {
943 ($($t:ty)*) => ($(
944 impl Wrapping<$t> {
945 #[doc = concat!("let n = Wrapping(", stringify!($t), "::MAX) >> 2;")]
956 #[inline]
960 #[must_use = "this returns the result of the operation, \
961 without modifying the original"]
962 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
963 pub const fn leading_zeros(self) -> u32 {
964 self.0.leading_zeros()
965 }
966
967 #[doc = concat!("assert_eq!(Wrapping(100", stringify!($t), ").abs(), Wrapping(100));")]
983 #[doc = concat!("assert_eq!(Wrapping(-100", stringify!($t), ").abs(), Wrapping(100));")]
984 #[doc = concat!("assert_eq!(Wrapping(", stringify!($t), "::MIN).abs(), Wrapping(", stringify!($t), "::MIN));")]
985 #[inline]
988 #[must_use = "this returns the result of the operation, \
989 without modifying the original"]
990 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
991 pub fn abs(self) -> Wrapping<$t> {
992 Wrapping(self.0.wrapping_abs())
993 }
994
995 #[doc = concat!("assert_eq!(Wrapping(10", stringify!($t), ").signum(), Wrapping(1));")]
1010 #[doc = concat!("assert_eq!(Wrapping(0", stringify!($t), ").signum(), Wrapping(0));")]
1011 #[doc = concat!("assert_eq!(Wrapping(-10", stringify!($t), ").signum(), Wrapping(-1));")]
1012 #[inline]
1014 #[must_use = "this returns the result of the operation, \
1015 without modifying the original"]
1016 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
1017 pub fn signum(self) -> Wrapping<$t> {
1018 Wrapping(self.0.signum())
1019 }
1020
1021 #[doc = concat!("assert!(Wrapping(10", stringify!($t), ").is_positive());")]
1033 #[doc = concat!("assert!(!Wrapping(-10", stringify!($t), ").is_positive());")]
1034 #[must_use]
1036 #[inline]
1037 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
1038 pub const fn is_positive(self) -> bool {
1039 self.0.is_positive()
1040 }
1041
1042 #[doc = concat!("assert!(Wrapping(-10", stringify!($t), ").is_negative());")]
1054 #[doc = concat!("assert!(!Wrapping(10", stringify!($t), ").is_negative());")]
1055 #[must_use]
1057 #[inline]
1058 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
1059 pub const fn is_negative(self) -> bool {
1060 self.0.is_negative()
1061 }
1062 }
1063 )*)
1064}
1065
1066impl Wrapping<isize> {
#[doc = "let n = Wrapping(isize::MAX) >> 2;"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn leading_zeros(self) -> u32 { self.0.leading_zeros() }
#[doc = "assert_eq!(Wrapping(100isize).abs(), Wrapping(100));"]
#[doc = "assert_eq!(Wrapping(-100isize).abs(), Wrapping(100));"]
#[doc = "assert_eq!(Wrapping(isize::MIN).abs(), Wrapping(isize::MIN));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn abs(self) -> Wrapping<isize> { Wrapping(self.0.wrapping_abs()) }
#[doc = "assert_eq!(Wrapping(10isize).signum(), Wrapping(1));"]
#[doc = "assert_eq!(Wrapping(0isize).signum(), Wrapping(0));"]
#[doc = "assert_eq!(Wrapping(-10isize).signum(), Wrapping(-1));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn signum(self) -> Wrapping<isize> { Wrapping(self.0.signum()) }
#[doc = "assert!(Wrapping(10isize).is_positive());"]
#[doc = "assert!(!Wrapping(-10isize).is_positive());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn is_positive(self) -> bool { self.0.is_positive() }
#[doc = "assert!(Wrapping(-10isize).is_negative());"]
#[doc = "assert!(!Wrapping(10isize).is_negative());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn is_negative(self) -> bool { self.0.is_negative() }
}
impl Wrapping<i8> {
#[doc = "let n = Wrapping(i8::MAX) >> 2;"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn leading_zeros(self) -> u32 { self.0.leading_zeros() }
#[doc = "assert_eq!(Wrapping(100i8).abs(), Wrapping(100));"]
#[doc = "assert_eq!(Wrapping(-100i8).abs(), Wrapping(100));"]
#[doc = "assert_eq!(Wrapping(i8::MIN).abs(), Wrapping(i8::MIN));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn abs(self) -> Wrapping<i8> { Wrapping(self.0.wrapping_abs()) }
#[doc = "assert_eq!(Wrapping(10i8).signum(), Wrapping(1));"]
#[doc = "assert_eq!(Wrapping(0i8).signum(), Wrapping(0));"]
#[doc = "assert_eq!(Wrapping(-10i8).signum(), Wrapping(-1));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn signum(self) -> Wrapping<i8> { Wrapping(self.0.signum()) }
#[doc = "assert!(Wrapping(10i8).is_positive());"]
#[doc = "assert!(!Wrapping(-10i8).is_positive());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn is_positive(self) -> bool { self.0.is_positive() }
#[doc = "assert!(Wrapping(-10i8).is_negative());"]
#[doc = "assert!(!Wrapping(10i8).is_negative());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn is_negative(self) -> bool { self.0.is_negative() }
}
impl Wrapping<i16> {
#[doc = "let n = Wrapping(i16::MAX) >> 2;"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn leading_zeros(self) -> u32 { self.0.leading_zeros() }
#[doc = "assert_eq!(Wrapping(100i16).abs(), Wrapping(100));"]
#[doc = "assert_eq!(Wrapping(-100i16).abs(), Wrapping(100));"]
#[doc = "assert_eq!(Wrapping(i16::MIN).abs(), Wrapping(i16::MIN));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn abs(self) -> Wrapping<i16> { Wrapping(self.0.wrapping_abs()) }
#[doc = "assert_eq!(Wrapping(10i16).signum(), Wrapping(1));"]
#[doc = "assert_eq!(Wrapping(0i16).signum(), Wrapping(0));"]
#[doc = "assert_eq!(Wrapping(-10i16).signum(), Wrapping(-1));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn signum(self) -> Wrapping<i16> { Wrapping(self.0.signum()) }
#[doc = "assert!(Wrapping(10i16).is_positive());"]
#[doc = "assert!(!Wrapping(-10i16).is_positive());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn is_positive(self) -> bool { self.0.is_positive() }
#[doc = "assert!(Wrapping(-10i16).is_negative());"]
#[doc = "assert!(!Wrapping(10i16).is_negative());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn is_negative(self) -> bool { self.0.is_negative() }
}
impl Wrapping<i32> {
#[doc = "let n = Wrapping(i32::MAX) >> 2;"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn leading_zeros(self) -> u32 { self.0.leading_zeros() }
#[doc = "assert_eq!(Wrapping(100i32).abs(), Wrapping(100));"]
#[doc = "assert_eq!(Wrapping(-100i32).abs(), Wrapping(100));"]
#[doc = "assert_eq!(Wrapping(i32::MIN).abs(), Wrapping(i32::MIN));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn abs(self) -> Wrapping<i32> { Wrapping(self.0.wrapping_abs()) }
#[doc = "assert_eq!(Wrapping(10i32).signum(), Wrapping(1));"]
#[doc = "assert_eq!(Wrapping(0i32).signum(), Wrapping(0));"]
#[doc = "assert_eq!(Wrapping(-10i32).signum(), Wrapping(-1));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn signum(self) -> Wrapping<i32> { Wrapping(self.0.signum()) }
#[doc = "assert!(Wrapping(10i32).is_positive());"]
#[doc = "assert!(!Wrapping(-10i32).is_positive());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn is_positive(self) -> bool { self.0.is_positive() }
#[doc = "assert!(Wrapping(-10i32).is_negative());"]
#[doc = "assert!(!Wrapping(10i32).is_negative());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn is_negative(self) -> bool { self.0.is_negative() }
}
impl Wrapping<i64> {
#[doc = "let n = Wrapping(i64::MAX) >> 2;"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn leading_zeros(self) -> u32 { self.0.leading_zeros() }
#[doc = "assert_eq!(Wrapping(100i64).abs(), Wrapping(100));"]
#[doc = "assert_eq!(Wrapping(-100i64).abs(), Wrapping(100));"]
#[doc = "assert_eq!(Wrapping(i64::MIN).abs(), Wrapping(i64::MIN));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn abs(self) -> Wrapping<i64> { Wrapping(self.0.wrapping_abs()) }
#[doc = "assert_eq!(Wrapping(10i64).signum(), Wrapping(1));"]
#[doc = "assert_eq!(Wrapping(0i64).signum(), Wrapping(0));"]
#[doc = "assert_eq!(Wrapping(-10i64).signum(), Wrapping(-1));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn signum(self) -> Wrapping<i64> { Wrapping(self.0.signum()) }
#[doc = "assert!(Wrapping(10i64).is_positive());"]
#[doc = "assert!(!Wrapping(-10i64).is_positive());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn is_positive(self) -> bool { self.0.is_positive() }
#[doc = "assert!(Wrapping(-10i64).is_negative());"]
#[doc = "assert!(!Wrapping(10i64).is_negative());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn is_negative(self) -> bool { self.0.is_negative() }
}
impl Wrapping<i128> {
#[doc = "let n = Wrapping(i128::MAX) >> 2;"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn leading_zeros(self) -> u32 { self.0.leading_zeros() }
#[doc = "assert_eq!(Wrapping(100i128).abs(), Wrapping(100));"]
#[doc = "assert_eq!(Wrapping(-100i128).abs(), Wrapping(100));"]
#[doc = "assert_eq!(Wrapping(i128::MIN).abs(), Wrapping(i128::MIN));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn abs(self) -> Wrapping<i128> { Wrapping(self.0.wrapping_abs()) }
#[doc = "assert_eq!(Wrapping(10i128).signum(), Wrapping(1));"]
#[doc = "assert_eq!(Wrapping(0i128).signum(), Wrapping(0));"]
#[doc = "assert_eq!(Wrapping(-10i128).signum(), Wrapping(-1));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn signum(self) -> Wrapping<i128> { Wrapping(self.0.signum()) }
#[doc = "assert!(Wrapping(10i128).is_positive());"]
#[doc = "assert!(!Wrapping(-10i128).is_positive());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn is_positive(self) -> bool { self.0.is_positive() }
#[doc = "assert!(Wrapping(-10i128).is_negative());"]
#[doc = "assert!(!Wrapping(10i128).is_negative());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn is_negative(self) -> bool { self.0.is_negative() }
}wrapping_int_impl_signed! { isize i8 i16 i32 i64 i128 }
1067
1068macro_rules! wrapping_int_impl_unsigned {
1069 ($($t:ty)*) => ($(
1070 impl Wrapping<$t> {
1071 #[doc = concat!("let n = Wrapping(", stringify!($t), "::MAX) >> 2;")]
1082 #[inline]
1086 #[must_use = "this returns the result of the operation, \
1087 without modifying the original"]
1088 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
1089 pub const fn leading_zeros(self) -> u32 {
1090 self.0.leading_zeros()
1091 }
1092
1093 #[doc = concat!("assert!(Wrapping(16", stringify!($t), ").is_power_of_two());")]
1104 #[doc = concat!("assert!(!Wrapping(10", stringify!($t), ").is_power_of_two());")]
1105 #[must_use]
1107 #[inline]
1108 #[unstable(feature = "wrapping_int_impl", issue = "32463")]
1109 pub fn is_power_of_two(self) -> bool {
1110 self.0.is_power_of_two()
1111 }
1112
1113 #[doc = concat!("assert_eq!(Wrapping(2", stringify!($t), ").next_power_of_two(), Wrapping(2));")]
1127 #[doc = concat!("assert_eq!(Wrapping(3", stringify!($t), ").next_power_of_two(), Wrapping(4));")]
1128 #[doc = concat!("assert_eq!(Wrapping(200_u8).next_power_of_two(), Wrapping(0));")]
1129 #[inline]
1131 #[must_use = "this returns the result of the operation, \
1132 without modifying the original"]
1133 #[unstable(feature = "wrapping_next_power_of_two", issue = "32463",
1134 reason = "needs decision on wrapping behavior")]
1135 pub fn next_power_of_two(self) -> Self {
1136 Wrapping(self.0.wrapping_next_power_of_two())
1137 }
1138 }
1139 )*)
1140}
1141
1142impl Wrapping<usize> {
#[doc = "let n = Wrapping(usize::MAX) >> 2;"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn leading_zeros(self) -> u32 { self.0.leading_zeros() }
#[doc = "assert!(Wrapping(16usize).is_power_of_two());"]
#[doc = "assert!(!Wrapping(10usize).is_power_of_two());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn is_power_of_two(self) -> bool { self.0.is_power_of_two() }
#[doc = "assert_eq!(Wrapping(2usize).next_power_of_two(), Wrapping(2));"]
#[doc = "assert_eq!(Wrapping(3usize).next_power_of_two(), Wrapping(4));"]
#[doc = "assert_eq!(Wrapping(200_u8).next_power_of_two(), Wrapping(0));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_next_power_of_two", issue = "32463", reason
= "needs decision on wrapping behavior")]
pub fn next_power_of_two(self) -> Self {
Wrapping(self.0.wrapping_next_power_of_two())
}
}
impl Wrapping<u8> {
#[doc = "let n = Wrapping(u8::MAX) >> 2;"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn leading_zeros(self) -> u32 { self.0.leading_zeros() }
#[doc = "assert!(Wrapping(16u8).is_power_of_two());"]
#[doc = "assert!(!Wrapping(10u8).is_power_of_two());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn is_power_of_two(self) -> bool { self.0.is_power_of_two() }
#[doc = "assert_eq!(Wrapping(2u8).next_power_of_two(), Wrapping(2));"]
#[doc = "assert_eq!(Wrapping(3u8).next_power_of_two(), Wrapping(4));"]
#[doc = "assert_eq!(Wrapping(200_u8).next_power_of_two(), Wrapping(0));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_next_power_of_two", issue = "32463", reason
= "needs decision on wrapping behavior")]
pub fn next_power_of_two(self) -> Self {
Wrapping(self.0.wrapping_next_power_of_two())
}
}
impl Wrapping<u16> {
#[doc = "let n = Wrapping(u16::MAX) >> 2;"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn leading_zeros(self) -> u32 { self.0.leading_zeros() }
#[doc = "assert!(Wrapping(16u16).is_power_of_two());"]
#[doc = "assert!(!Wrapping(10u16).is_power_of_two());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn is_power_of_two(self) -> bool { self.0.is_power_of_two() }
#[doc = "assert_eq!(Wrapping(2u16).next_power_of_two(), Wrapping(2));"]
#[doc = "assert_eq!(Wrapping(3u16).next_power_of_two(), Wrapping(4));"]
#[doc = "assert_eq!(Wrapping(200_u8).next_power_of_two(), Wrapping(0));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_next_power_of_two", issue = "32463", reason
= "needs decision on wrapping behavior")]
pub fn next_power_of_two(self) -> Self {
Wrapping(self.0.wrapping_next_power_of_two())
}
}
impl Wrapping<u32> {
#[doc = "let n = Wrapping(u32::MAX) >> 2;"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn leading_zeros(self) -> u32 { self.0.leading_zeros() }
#[doc = "assert!(Wrapping(16u32).is_power_of_two());"]
#[doc = "assert!(!Wrapping(10u32).is_power_of_two());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn is_power_of_two(self) -> bool { self.0.is_power_of_two() }
#[doc = "assert_eq!(Wrapping(2u32).next_power_of_two(), Wrapping(2));"]
#[doc = "assert_eq!(Wrapping(3u32).next_power_of_two(), Wrapping(4));"]
#[doc = "assert_eq!(Wrapping(200_u8).next_power_of_two(), Wrapping(0));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_next_power_of_two", issue = "32463", reason
= "needs decision on wrapping behavior")]
pub fn next_power_of_two(self) -> Self {
Wrapping(self.0.wrapping_next_power_of_two())
}
}
impl Wrapping<u64> {
#[doc = "let n = Wrapping(u64::MAX) >> 2;"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn leading_zeros(self) -> u32 { self.0.leading_zeros() }
#[doc = "assert!(Wrapping(16u64).is_power_of_two());"]
#[doc = "assert!(!Wrapping(10u64).is_power_of_two());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn is_power_of_two(self) -> bool { self.0.is_power_of_two() }
#[doc = "assert_eq!(Wrapping(2u64).next_power_of_two(), Wrapping(2));"]
#[doc = "assert_eq!(Wrapping(3u64).next_power_of_two(), Wrapping(4));"]
#[doc = "assert_eq!(Wrapping(200_u8).next_power_of_two(), Wrapping(0));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_next_power_of_two", issue = "32463", reason
= "needs decision on wrapping behavior")]
pub fn next_power_of_two(self) -> Self {
Wrapping(self.0.wrapping_next_power_of_two())
}
}
impl Wrapping<u128> {
#[doc = "let n = Wrapping(u128::MAX) >> 2;"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub const fn leading_zeros(self) -> u32 { self.0.leading_zeros() }
#[doc = "assert!(Wrapping(16u128).is_power_of_two());"]
#[doc = "assert!(!Wrapping(10u128).is_power_of_two());"]
#[must_use]
#[inline]
#[unstable(feature = "wrapping_int_impl", issue = "32463")]
pub fn is_power_of_two(self) -> bool { self.0.is_power_of_two() }
#[doc = "assert_eq!(Wrapping(2u128).next_power_of_two(), Wrapping(2));"]
#[doc = "assert_eq!(Wrapping(3u128).next_power_of_two(), Wrapping(4));"]
#[doc = "assert_eq!(Wrapping(200_u8).next_power_of_two(), Wrapping(0));"]
#[inline]
#[must_use =
"this returns the result of the operation, \
without modifying the original"]
#[unstable(feature = "wrapping_next_power_of_two", issue = "32463", reason
= "needs decision on wrapping behavior")]
pub fn next_power_of_two(self) -> Self {
Wrapping(self.0.wrapping_next_power_of_two())
}
}wrapping_int_impl_unsigned! { usize u8 u16 u32 u64 u128 }