]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/auxiliary/issue-2526.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / issues / auxiliary / issue-2526.rs
1 #![crate_name="issue_2526"]
2 #![crate_type = "lib"]
3
4 use std::marker;
5
6 pub struct arc_destruct<T: Sync> {
7 _data: isize,
8 _marker: marker::PhantomData<T>
9 }
10
11 impl<T: Sync> Drop for arc_destruct<T> {
12 fn drop(&mut self) {}
13 }
14
15 fn arc_destruct<T: Sync>(data: isize) -> arc_destruct<T> {
16 arc_destruct {
17 _data: data,
18 _marker: marker::PhantomData
19 }
20 }
21
22 fn arc<T: Sync>(_data: T) -> arc_destruct<T> {
23 arc_destruct(0)
24 }
25
26 fn init() -> arc_destruct<context_res> {
27 arc(context_res())
28 }
29
30 pub struct context_res {
31 ctx : isize,
32 }
33
34 impl Drop for context_res {
35 fn drop(&mut self) {}
36 }
37
38 fn context_res() -> context_res {
39 context_res {
40 ctx: 0
41 }
42 }
43
44 pub type context = arc_destruct<context_res>;