mirror of
https://github.com/openRuyi-Project/gcc.git
synced 2026-10-03 23:48:37 +00:00
This commit imports libcore 1.49.0 into a new directory, "libgrust/rustc-lib/core". LICENSE-* files are taken from the rustc 1.49.0 repository root. libgrust/ChangeLog: * rustc-lib/LICENSE-APACHE: New file. * rustc-lib/LICENSE-MIT: New file. * rustc-lib/version-info: New file. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
20 lines
252 B
Rust
20 lines
252 B
Rust
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 };
|
|
})
|
|
}
|