提交 2b83defa 编写于 作者: A Andrew Paseltiner

core: derive Clone for core types

上级 28efc234
...@@ -231,6 +231,7 @@ pub mod rt; ...@@ -231,6 +231,7 @@ pub mod rt;
// can be resolved within libcore. // can be resolved within libcore.
#[doc(hidden)] #[doc(hidden)]
pub mod core { pub mod core {
pub use clone;
pub use cmp; pub use cmp;
pub use condition; pub use condition;
pub use option; pub use option;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
use vec; use vec;
/// The either type /// The either type
#[deriving(Eq)] #[deriving(Clone, Eq)]
pub enum Either<T, U> { pub enum Either<T, U> {
Left(T), Left(T),
Right(U) Right(U)
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
#[cfg(test)] use str; #[cfg(test)] use str;
/// The option type /// The option type
#[deriving(Eq)] #[deriving(Clone, Eq)]
pub enum Option<T> { pub enum Option<T> {
None, None,
Some(T), Some(T),
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
use str; use str;
use to_str::ToStr; use to_str::ToStr;
#[deriving(Eq)] #[deriving(Clone, Eq)]
pub struct WindowsPath { pub struct WindowsPath {
host: Option<~str>, host: Option<~str>,
device: Option<~str>, device: Option<~str>,
...@@ -32,7 +32,7 @@ pub fn WindowsPath(s: &str) -> WindowsPath { ...@@ -32,7 +32,7 @@ pub fn WindowsPath(s: &str) -> WindowsPath {
GenericPath::from_str(s) GenericPath::from_str(s)
} }
#[deriving(Eq)] #[deriving(Clone, Eq)]
pub struct PosixPath { pub struct PosixPath {
is_absolute: bool, is_absolute: bool,
components: ~[~str], components: ~[~str],
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
use vec; use vec;
/// The result type /// The result type
#[deriving(Eq)] #[deriving(Clone, Eq)]
pub enum Result<T, U> { pub enum Result<T, U> {
/// Contains the successful result value /// Contains the successful result value
Ok(T), Ok(T),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册