diff --git a/src/dox.rs b/src/dox.rs index 941b65cc..4b03a5ab 100644 --- a/src/dox.rs +++ b/src/dox.rs @@ -91,12 +91,39 @@ mod imp { fn sub(self, rhs: RHS) -> Self::Output; } + #[lang = "bitand"] + pub trait BitAnd { + type Output; + fn bitand(self, rhs: RHS) -> Self::Output; + } + + #[lang = "bitand_assign"] + pub trait BitAndAssign { + fn bitand_assign(&mut self, rhs: RHS); + } + #[lang = "bitor"] - pub trait Bitor { + pub trait BitOr { type Output; fn bitor(self, rhs: RHS) -> Self::Output; } + #[lang = "bitor_assign"] + pub trait BitOrAssign { + fn bitor_assign(&mut self, rhs: RHS); + } + + #[lang = "bitxor"] + pub trait BitXor { + type Output; + fn bitxor(self, rhs: RHS) -> Self::Output; + } + + #[lang = "bitxor_assign"] + pub trait BitXorAssign { + fn bitxor_assign(&mut self, rhs: RHS); + } + #[lang = "neg"] pub trait Neg { type Output; @@ -134,10 +161,27 @@ mod imp { type Output = $i; fn sub(self, rhs: $i) -> $i { self - rhs } } - impl Bitor for $i { + impl BitAnd for $i { + type Output = $i; + fn bitand(self, rhs: $i) -> $i { self & rhs } + } + impl BitAndAssign for $i { + fn bitand_assign(&mut self, rhs: $i) { *self &= rhs; } + } + impl BitOr for $i { type Output = $i; fn bitor(self, rhs: $i) -> $i { self | rhs } } + impl BitOrAssign for $i { + fn bitor_assign(&mut self, rhs: $i) { *self |= rhs; } + } + impl BitXor for $i { + type Output = $i; + fn bitxor(self, rhs: $i) -> $i { self ^ rhs } + } + impl BitXorAssign for $i { + fn bitxor_assign(&mut self, rhs: $i) { *self ^= rhs; } + } impl Neg for $i { type Output = $i; fn neg(self) -> $i { -self }