Skip to content

Commit d13a98f

Browse files
committed
---
yaml --- r: 64615 b: refs/heads/snap-stage3 c: ca5ed4c h: refs/heads/master i: 64613: 12c647a 64611: d7f6ad2 64607: 610c696 v: v3
1 parent 28d7eea commit d13a98f

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 9f7e364d3a0f5d325f3722efb9c7ae4257b04e3d
4+
refs/heads/snap-stage3: ca5ed4cc498ad5da22c6e1c4c0b79df07a07029e
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/ops.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,28 @@ pub trait Shr<RHS,Result> {
8181
pub trait Index<Index,Result> {
8282
fn index(&self, index: &Index) -> Result;
8383
}
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+
}

0 commit comments

Comments
 (0)