core: Inherit the cell module

This commit is contained in:
Alex Crichton 2014-05-01 11:19:56 -07:00
parent d4b5d82a33
commit f62c121eb0
4 changed files with 5 additions and 9 deletions

View File

@ -12,7 +12,6 @@
use clone::Clone;
use cmp::Eq;
use fmt;
use kinds::{marker, Copy};
use ops::{Deref, DerefMut, Drop};
use option::{None, Option, Some};
@ -60,12 +59,6 @@ impl<T:Eq + Copy> Eq for Cell<T> {
}
}
impl<T: Copy + fmt::Show> fmt::Show for Cell<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f.buf, r"Cell \{ value: {} \}", self.get())
}
}
/// A mutable memory location with dynamically checked borrow rules
pub struct RefCell<T> {
value: Unsafe<T>,

View File

@ -67,11 +67,12 @@ mod unicode;
mod unit;
pub mod any;
pub mod bool;
pub mod cell;
pub mod char;
pub mod finally;
pub mod iter;
pub mod option;
pub mod raw;
pub mod char;
pub mod result;
pub mod slice;
pub mod str;

View File

@ -485,6 +485,7 @@ will look like `"\\{"`.
use any;
use cast;
use cell::Cell;
use char::Char;
use cmp;
use container::Container;
@ -492,6 +493,7 @@ use io::MemWriter;
use io;
use iter;
use iter::{Iterator, range};
use kinds::Copy;
use num::Signed;
use option::{Option, Some, None};
use owned::Box;

View File

@ -141,6 +141,7 @@ extern crate core;
pub use core::any;
pub use core::bool;
pub use core::cast;
pub use core::cell;
pub use core::char;
pub use core::clone;
pub use core::container;
@ -220,7 +221,6 @@ pub mod hash;
/* Common data structures */
pub mod result;
pub mod cell;
/* Tasks and communication */