about summary refs log tree commit diff
path: root/example
diff options
context:
space:
mode:
authorantoyo <antoyo@users.noreply.github.com>2021-08-15 08:28:46 -0400
committerGitHub <noreply@github.com>2021-08-15 08:28:46 -0400
commite228f0c16ea8c34794a6285bf57aab627c26b147 (patch)
treec6f8c6a5a180e29c5baf334a794064b83ae194e0 /example
parent0c89065b934397b62838fe3e4ef6f6352fc52daf (diff)
downloadrust-e228f0c16ea8c34794a6285bf57aab627c26b147.tar.gz
rust-e228f0c16ea8c34794a6285bf57aab627c26b147.zip
Cleanup (#67)
Diffstat (limited to 'example')
-rw-r--r--example/mini_core_hello_world.rs2
-rw-r--r--example/std_example.rs5
2 files changed, 3 insertions, 4 deletions
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;