Sign in
fuchsia
/
third_party
/
rust
/
ddb8551e03a1310a841da05b0418b49fd6287482
/
.
/
library
/
core
/
benches
/
ops.rs
blob: 0a2be8a28819fc6809972bf206dc711e604d343d [
file
] [
log
] [
blame
]
use
core
::
ops
::*;
use
test
::
Bencher
;
// Overhead of dtors
struct
HasDtor
{
_x
:
isize
,
}
impl
Drop
for
HasDtor
{
fn
drop
(&
mut
self
)
{}
}
#[
bench
]
fn
alloc_obj_with_dtor
(
b
:
&
mut
Bencher
)
{
b
.
iter
(||
{
HasDtor
{
_x
:
10
};
})
}