Remove all Arc-less ignores, force reasons, ignore_heap_size_of

This commit is contained in:
Manish Goregaokar 2015-05-27 22:53:01 +05:30
parent 5447d2af3d
commit 13b4bcfbb7
7 changed files with 97 additions and 82 deletions

View file

@ -9,11 +9,12 @@ use std::collections::LinkedList;
use std::mem::transmute;
use std::sync::Arc;
use geom::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D};
use azure::azure_hl::Color;
use cursor::Cursor;
use geom::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D};
use geometry::Au;
use range::Range;
use azure::azure_hl::Color;
extern {
// Get the size of a heap block.
@ -41,9 +42,6 @@ pub fn heap_size_of(ptr: *const c_void) -> usize {
// return multiple measurements -- e.g. measure text separately from images -- are also possible,
// and should be used when appropriate.
//
// FIXME(njn): it would be nice to be able to derive this trait automatically, given that
// implementations are mostly repetitive and mechanical.
//
pub trait HeapSizeOf {
/// Measure the size of any heap-allocated structures that hang off this value, but not the
/// space taken up by the value itself (i.e. what size_of::<T> measures, more or less); that
@ -165,7 +163,7 @@ impl<T> Drop for LinkedList2<T> {
}
/// For use on types defined in external crates
/// with known heap sizes
/// with known heap sizes.
#[macro_export]
macro_rules! known_heap_size(
($size:expr, $($ty:ident),+) => (
@ -197,5 +195,5 @@ known_heap_size!(0, bool, f32, f64);
known_heap_size!(0, Rect<T>, Point2D<T>, Size2D<T>, Matrix2D<T>, SideOffsets2D<T>);
known_heap_size!(0, Au, Color);
known_heap_size!(0, Au, Color, Cursor);
known_heap_size!(0, Range<T>);