|
@@ -7,13 +7,10 @@ use prelude::*;
|
|
|
|
|
|
/// Types that have no destructor.
|
|
|
///
|
|
|
-/// This trait act as a simple static assertions catching dumb logic errors and memory leaks.
|
|
|
+/// This trait holds the invariant that our type carries no destructor.
|
|
|
///
|
|
|
/// Since one cannot define mutually exclusive traits, we have this as a temporary hack.
|
|
|
-pub trait Leak {}
|
|
|
+pub unsafe trait Leak {}
|
|
|
|
|
|
-impl Leak for () {}
|
|
|
-impl Leak for Block {}
|
|
|
-impl Leak for u8 {}
|
|
|
-impl Leak for u16 {}
|
|
|
-impl Leak for i32 {}
|
|
|
+unsafe impl Leak for Block {}
|
|
|
+unsafe impl<T: Copy> Leak for T {}
|