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 1
1
---
2
- refs/heads/master: 9f7e364d3a0f5d325f3722efb9c7ae4257b04e3d
2
+ refs/heads/master: ca5ed4cc498ad5da22c6e1c4c0b79df07a07029e
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
5
5
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
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