}
}
+impl Mul for usize {
+ type Output = Self;
+
+ fn mul(self, rhs: Self) -> Self::Output {
+ self * rhs
+ }
+}
+
#[lang = "add"]
pub trait Add<RHS = Self> {
type Output;
}
}
+impl PartialEq for isize {
+ fn eq(&self, other: &isize) -> bool {
+ (*self) == (*other)
+ }
+ fn ne(&self, other: &isize) -> bool {
+ (*self) != (*other)
+ }
+}
+
impl PartialEq for char {
fn eq(&self, other: &char) -> bool {
(*self) == (*other)
#[link(name = "c")]
extern "C" {
pub fn puts(s: *const u8);
+ pub fn printf(format: *const i8, ...) -> i32;
pub fn malloc(size: usize) -> *mut u8;
pub fn free(ptr: *mut u8);
pub fn memcpy(dst: *mut u8, src: *const u8, size: usize);