3 // [thir]compile-flags: -Zthir-unsafeck
7 struct ArenaSet<U: Deref, V=<U as Deref>::Target>(U, &'static V)
8 where V: 'static + ?Sized;
10 static Z: [u8; 4] = [1,2,3,4];
12 fn arena() -> &'static ArenaSet<Vec<u8>> {
13 fn __static_ref_initialize() -> ArenaSet<Vec<u8>> {
18 fn require_sync<T: Sync>(_: &T) { }
19 unsafe fn __stability() -> &'static ArenaSet<Vec<u8>> {
20 use std::mem::transmute;
21 static mut DATA: *const ArenaSet<Vec<u8>> = std::ptr::null_mut();
23 static mut ONCE: Once = Once::new();
26 ::<Box<ArenaSet<Vec<u8>>>, *const ArenaSet<Vec<u8>>>
27 (Box::new(__static_ref_initialize()));
32 let static_ref = __stability();
33 require_sync(static_ref);
39 let &ArenaSet(ref u, v) = arena();
40 assert!(u.is_empty());