Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions example/mini_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ unsafe impl Copy for u8 {}
unsafe impl Copy for u16 {}
unsafe impl Copy for u32 {}
unsafe impl Copy for u64 {}
unsafe impl Copy for u128 {}
unsafe impl Copy for usize {}
unsafe impl Copy for i8 {}
unsafe impl Copy for i16 {}
Expand Down Expand Up @@ -283,6 +284,15 @@ impl PartialEq for u64 {
}
}

impl PartialEq for u128 {
fn eq(&self, other: &u128) -> bool {
(*self) == (*other)
}
fn ne(&self, other: &u128) -> bool {
(*self) != (*other)
}
}

impl PartialEq for usize {
fn eq(&self, other: &usize) -> bool {
(*self) == (*other)
Expand Down
22 changes: 22 additions & 0 deletions example/mini_core_hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ fn main() {
assert_eq!(repeat[0], Some(42));
assert_eq!(repeat[1], Some(42));

from_decimal_string();

#[cfg(not(jit))]
test_tls();

Expand Down Expand Up @@ -446,3 +448,23 @@ fn check_niche_behavior () {
intrinsics::abort();
}
}

fn from_decimal_string() {
loop {
let multiplier = 1;

take_multiplier_ref(&multiplier);

if multiplier == 1 {
break;
}

unreachable();
}
}

fn take_multiplier_ref(_multiplier: &u128) {}

fn unreachable() -> ! {
panic("unreachable")
}