blob: 690f3b477015da8133110df31c86b05efb43179f [file] [log] [blame]
#![allow(
dead_code,
non_snake_case,
non_camel_case_types,
non_upper_case_globals
)]
impl Foo {
pub const Bar: Foo = Foo(2);
}
impl Foo {
pub const Baz: Foo = Foo(4);
}
impl Foo {
pub const Duplicated: Foo = Foo(4);
}
impl Foo {
pub const Negative: Foo = Foo(-3);
}
impl ::std::ops::BitOr<Foo> for Foo {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
Foo(self.0 | other.0)
}
}
impl ::std::ops::BitOrAssign for Foo {
#[inline]
fn bitor_assign(&mut self, rhs: Foo) {
self.0 |= rhs.0;
}
}
impl ::std::ops::BitAnd<Foo> for Foo {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
Foo(self.0 & other.0)
}
}
impl ::std::ops::BitAndAssign for Foo {
#[inline]
fn bitand_assign(&mut self, rhs: Foo) {
self.0 &= rhs.0;
}
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct Foo(pub ::std::os::raw::c_int);