diff options
| author | Flavio Percoco <flaper87@gmail.com> | 2014-03-27 00:01:11 +0100 |
|---|---|---|
| committer | Flavio Percoco <flaper87@gmail.com> | 2014-03-28 10:34:02 +0100 |
| commit | 81ec1f3c186cd64450d8141aab467f0a1f3a7ebd (patch) | |
| tree | 025bc116bb409b5514e9b42d62f19464531dffcd /src/libstd/cell.rs | |
| parent | ff64381c8bf6a49a0671287de5f5b7316ae2ef9c (diff) | |
Rename Pod into Copy
Summary: So far, we've used the term POD "Plain Old Data" to refer to types that can be safely copied. However, this term is not consistent with the other built-in bounds that use verbs instead. This patch renames the Pod kind into Copy. RFC: 0003-opt-in-builtin-traits Test Plan: make check Reviewers: cmr Differential Revision: http://phabricator.octayn.net/D3
Diffstat (limited to 'src/libstd/cell.rs')
| -rw-r--r-- | src/libstd/cell.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/cell.rs b/src/libstd/cell.rs index e0912b826cd..a826521ab6b 100644 --- a/src/libstd/cell.rs +++ b/src/libstd/cell.rs @@ -14,18 +14,18 @@ use cast; use clone::Clone; use cmp::Eq; use fmt; -use kinds::{marker, Pod}; +use kinds::{marker, Copy}; use ops::{Deref, DerefMut, Drop}; use option::{None, Option, Some}; use ty::Unsafe; -/// A mutable memory location that admits only `Pod` data. +/// A mutable memory location that admits only `Copy` data. pub struct Cell<T> { priv value: Unsafe<T>, priv noshare: marker::NoShare, } -impl<T:Pod> Cell<T> { +impl<T:Copy> Cell<T> { /// Creates a new `Cell` containing the given value. pub fn new(value: T) -> Cell<T> { Cell { @@ -49,13 +49,13 @@ impl<T:Pod> Cell<T> { } } -impl<T:Pod> Clone for Cell<T> { +impl<T:Copy> Clone for Cell<T> { fn clone(&self) -> Cell<T> { Cell::new(self.get()) } } -impl<T:Eq + Pod> Eq for Cell<T> { +impl<T:Eq + Copy> Eq for Cell<T> { fn eq(&self, other: &Cell<T>) -> bool { self.get() == other.get() } @@ -71,7 +71,7 @@ impl<T: fmt::Show> fmt::Show for Cell<T> { pub struct RefCell<T> { priv value: Unsafe<T>, priv borrow: BorrowFlag, - priv nopod: marker::NoPod, + priv nocopy: marker::NoCopy, priv noshare: marker::NoShare, } @@ -86,7 +86,7 @@ impl<T> RefCell<T> { pub fn new(value: T) -> RefCell<T> { RefCell { value: Unsafe::new(value), - nopod: marker::NoPod, + nocopy: marker::NoCopy, noshare: marker::NoShare, borrow: UNUSED, } |
