]> git.lizzy.rs Git - rust.git/blobdiff - example/mini_core_hello_world.rs
Fix rotate_left and rotate_right with 128bit shift amount
[rust.git] / example / mini_core_hello_world.rs
index 08ceaeb65443f96400f1ba2da03a47f343b70237..47abe2d1de80057ab3dc3c0d9d38e8e162957985 100644 (file)
@@ -1,7 +1,4 @@
-#![feature(
-    no_core, start, lang_items, box_syntax, never_type, linkage,
-    extern_types, thread_local
-)]
+#![feature(no_core, lang_items, box_syntax, never_type, linkage, extern_types, thread_local)]
 #![no_core]
 #![allow(dead_code, non_camel_case_types)]
 
@@ -299,6 +296,11 @@ struct ExternTypeWrapper {
     unsafe {
         global_asm_test();
     }
+
+    // Both statics have a reference that points to the same anonymous allocation.
+    static REF1: &u8 = &42;
+    static REF2: &u8 = REF1;
+    assert_eq!(*REF1, *REF2);
 }
 
 #[cfg(all(not(jit), target_os = "linux"))]