nodrop: Use odds & bump version

This commit is contained in:
root
2015-06-02 17:27:44 +02:00
parent 48fdc7e651
commit 7c92874782
2 changed files with 8 additions and 19 deletions
+4 -18
View File
@@ -12,6 +12,10 @@
#![cfg_attr(feature="no_drop_flag", feature(unsafe_no_drop_flag))]
extern crate odds;
use odds::debug_assert_unreachable;
use std::ops::{Deref, DerefMut};
use std::ptr;
use std::mem;
@@ -58,24 +62,6 @@ impl<T> Drop for NoDrop<T> {
}
}
enum Void { }
/// FIXME: Replace with intrinsic when it's stable
#[inline]
unsafe fn unreachable() -> ! {
let void: &Void = mem::transmute(&());
match *void {
// no cases
}
}
#[inline]
unsafe fn debug_assert_unreachable() -> ! {
debug_assert!(false, "Entered unreachable section, this is a bug!");
unreachable()
}
impl<T> Deref for NoDrop<T> {
type Target = T;