File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
14
14
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
15
15
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
16
16
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17
- refs/heads/auto: 9f7e364d3a0f5d325f3722efb9c7ae4257b04e3d
17
+ refs/heads/auto: ca5ed4cc498ad5da22c6e1c4c0b79df07a07029e
18
18
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
19
19
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
Original file line number Diff line number Diff line change @@ -81,3 +81,28 @@ pub trait Shr<RHS,Result> {
81
81
pub trait Index < Index , Result > {
82
82
fn index ( & self , index : & Index ) -> Result ;
83
83
}
84
+
85
+ #[ cfg( test) ]
86
+ mod bench {
87
+
88
+ use extra:: test:: BenchHarness ;
89
+ use ops:: Drop ;
90
+
91
+ // Overhead of dtors
92
+
93
+ struct HasDtor {
94
+ x : int
95
+ }
96
+
97
+ impl Drop for HasDtor {
98
+ fn drop ( & self ) {
99
+ }
100
+ }
101
+
102
+ #[ bench]
103
+ fn alloc_obj_with_dtor ( bh : & mut BenchHarness ) {
104
+ do bh. iter {
105
+ HasDtor { x : 10 } ;
106
+ }
107
+ }
108
+ }
You can’t perform that action at this time.
0 commit comments