]>
git.proxmox.com Git - rustc.git/blob - src/liblibc/src/dox.rs
5 pub use core
::option
::Option
;
6 pub use core
::clone
::Clone
;
7 pub use core
::marker
::Copy
;
17 impl<T
: Copy
> Copy
for Option
<T
> {}
18 impl<T
: Clone
> Clone
for Option
<T
> {
19 fn clone(&self) -> Option
<T
> { loop {}
}
23 fn clone(&self) -> Self;
39 macro_rules
! each_int
{
46 each_signed_int
!($mac
);
50 macro_rules
! each_signed_int
{
63 fn div(self, rhs
: RHS
) -> Self::Output
;
66 macro_rules
! impl_div
{
70 fn div(self, rhs
: $i
) -> $i { self / rhs }
79 fn shl(self, rhs
: RHS
) -> Self::Output
;
82 macro_rules
! impl_shl
{
86 fn shl(self, rhs
: $i
) -> $i { self << rhs }
93 pub trait Mul
<RHS
=Self> {
95 fn mul(self, rhs
: RHS
) -> Self::Output
;
98 macro_rules
! impl_mul
{
102 fn mul(self, rhs
: $i
) -> $i { self * rhs }
109 pub trait Sub
<RHS
=Self> {
111 fn sub(self, rhs
: RHS
) -> Self::Output
;
114 macro_rules
! impl_sub
{
115 ($
($i
:ident
)*) => ($
(
118 fn sub(self, rhs
: $i
) -> $i { self - rhs }
125 pub trait Bitor
<RHS
=Self> {
127 fn bitor(self, rhs
: RHS
) -> Self::Output
;
130 macro_rules
! impl_bitor
{
131 ($
($i
:ident
)*) => ($
(
134 fn bitor(self, rhs
: $i
) -> $i { self | rhs }
138 each_int
!(impl_bitor
);
143 fn neg(self) -> Self::Output
;
146 macro_rules
! impl_neg
{
147 ($
($i
:ident
)*) => ($
(
150 fn neg(self) -> $i { -self }
154 each_signed_int
!(impl_neg
);
159 fn not(self) -> Self::Output
;
162 macro_rules
! impl_not
{
163 ($
($i
:ident
)*) => ($
(
166 fn not(self) -> $i { !self }
173 pub fn size_of_val
<T
>(_
: &T
) -> usize { 4 }