]> git.lizzy.rs Git - rust.git/blobdiff - example/mini_core_hello_world.rs
Merge pull request #1158 from bjorn3/isolate_mono_items_pr
[rust.git] / example / mini_core_hello_world.rs
index ea37ca98b59a79c160036bea3dffec96ea517117..47abe2d1de80057ab3dc3c0d9d38e8e162957985 100644 (file)
@@ -296,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"))]