2 #![allow(unused_variables)]
3 #![allow(stable_features)]
5 // test that ordinary fat pointer operations work.
7 #![feature(braced_empty_structs)]
8 #![feature(rustc_attrs)]
10 use std::sync::atomic;
11 use std::sync::atomic::Ordering::SeqCst;
13 static COUNTER: atomic::AtomicUsize = atomic::AtomicUsize::new(0);
18 impl Drop for DropMe {
20 COUNTER.fetch_add(1, SeqCst);
24 fn fat_ptr_move_then_drop(a: Box<[DropMe]>) {
29 let a: Box<[DropMe]> = Box::new([DropMe { }]);
30 fat_ptr_move_then_drop(a);
31 assert_eq!(COUNTER.load(SeqCst), 1);