1 #![feature(no_core, lang_items)]
11 unsafe impl Copy for u8 {}
12 unsafe impl Copy for u16 {}
13 unsafe impl Copy for u32 {}
14 unsafe impl Copy for u64 {}
15 unsafe impl Copy for usize {}
16 unsafe impl Copy for i8 {}
17 unsafe impl Copy for i16 {}
18 unsafe impl Copy for i32 {}
19 unsafe impl Copy for isize {}
20 unsafe impl<'a, T: ?Sized> Copy for &'a T {}
21 unsafe impl<T: ?Sized> Copy for *const T {}
27 trait Mul<RHS = Self> {
31 fn mul(self, rhs: RHS) -> Self::Output;
37 fn mul(self, rhs: Self) -> Self {
43 pub trait PartialEq<Rhs: ?Sized = Self> {
44 fn eq(&self, other: &Rhs) -> bool;
45 fn ne(&self, other: &Rhs) -> bool;
48 impl PartialEq for u8 {
49 fn eq(&self, other: &u8) -> bool { (*self) == (*other) }
50 fn ne(&self, other: &u8) -> bool { (*self) != (*other) }
53 impl<T: ?Sized> PartialEq for *const T {
54 fn eq(&self, other: &*const T) -> bool { *self == *other }
55 fn ne(&self, other: &*const T) -> bool { *self != *other }
59 fn panic(_expr_file_line_col: &(&'static str, &'static str, u32, u32)) -> ! {
63 #[lang = "drop_in_place"]
64 #[allow(unconditional_recursion)]
65 unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
66 // Code here does not matter - this is replaced by the
67 // real drop glue by the compiler.
68 drop_in_place(to_drop);
75 fn bcd(b: bool, a: u8) -> u8 {
83 // FIXME make calls work
98 fn option_unwrap_or(o: BoolOption, d: bool) -> bool {
100 BoolOption::Some(b) => b,
101 BoolOption::None => d,
109 fn return_str() -> &'static str {
113 fn promoted_val() -> &'static u8 {
117 fn cast_ref_to_raw_ptr(abc: &u8) -> *const u8 {
121 fn cmp_raw_ptr(a: *const u8, b: *const u8) -> bool {
125 fn int_cast(a: u16, b: i16) -> (u8, u16, u32, usize, i8, i16, i32, isize) {