From e228f0c16ea8c34794a6285bf57aab627c26b147 Mon Sep 17 00:00:00 2001 From: antoyo Date: Sun, 15 Aug 2021 08:28:46 -0400 Subject: Cleanup (#67) --- example/mini_core_hello_world.rs | 2 +- example/std_example.rs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'example') diff --git a/example/mini_core_hello_world.rs b/example/mini_core_hello_world.rs index ccf4b53a702..69d591565ac 100644 --- a/example/mini_core_hello_world.rs +++ b/example/mini_core_hello_world.rs @@ -253,7 +253,7 @@ fn main() { } } - // TODO: not sure about this assert. ABC is not defined, so should it be really 0? + // TODO(antoyo): to make this work, support weak linkage. //unsafe { assert_eq!(ABC as usize, 0); } &mut (|| Some(0 as *const ())) as &mut dyn FnMut() -> Option<*const ()>; diff --git a/example/std_example.rs b/example/std_example.rs index d99d6bb4b85..eba0eb82896 100644 --- a/example/std_example.rs +++ b/example/std_example.rs @@ -16,7 +16,6 @@ fn main() { let stderr = ::std::io::stderr(); let mut stderr = stderr.lock(); - // FIXME: this thread panics. std::thread::spawn(move || { println!("Hello from another thread!"); }); @@ -56,7 +55,7 @@ fn main() { assert_eq!(-32768i16, (-32768i16).saturating_add(-32768)); assert_eq!(32767i16, 32767i16.saturating_add(1)); - /*assert_eq!(0b0000000000000000000000000010000010000000000000000000000000000000_0000000000100000000000000000000000001000000000000100000000000000u128.leading_zeros(), 26); + assert_eq!(0b0000000000000000000000000010000010000000000000000000000000000000_0000000000100000000000000000000000001000000000000100000000000000u128.leading_zeros(), 26); assert_eq!(0b0000000000000000000000000010000000000000000000000000000000000000_0000000000000000000000000000000000001000000000000000000010000000u128.trailing_zeros(), 7); let _d = 0i128.checked_div(2i128); @@ -85,7 +84,7 @@ fn main() { assert_eq!(houndred_i128 as f32, 100.0); assert_eq!(houndred_i128 as f64, 100.0); assert_eq!(houndred_f32 as i128, 100); - assert_eq!(houndred_f64 as i128, 100);*/ + assert_eq!(houndred_f64 as i128, 100); let _a = 1u32 << 2u8; -- cgit 1.4.1-3-g733a5