about summary refs log tree commit diff
path: root/src/libstd/io/mod.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-29 16:36:22 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-29 16:36:22 -0800
commit1c61e74518e4dc8c3fdd7f14824b4e79befeefcb (patch)
tree4b9fe4411d3af5b373031535399804cdf9d7c50a /src/libstd/io/mod.rs
parent4717f07989fe4a5d8e473961b86a613d4bb07f35 (diff)
parent3358e64b8e0a435d428f5303729b8563890abccd (diff)
downloadrust-1c61e74518e4dc8c3fdd7f14824b4e79befeefcb.tar.gz
rust-1c61e74518e4dc8c3fdd7f14824b4e79befeefcb.zip
rollup merge of #20250: ipetkov/deriving
* Both enums already derived `Copy`, but storing them in any
  struct/container would prevent implementing `Clone` for said
  struct/container even though they should be clonable.
* Also add PartialEq and Eq for good measure.
Diffstat (limited to 'src/libstd/io/mod.rs')
-rw-r--r--src/libstd/io/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index c87c35e8327..8ea629fb9f2 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -1724,7 +1724,7 @@ pub fn standard_error(kind: IoErrorKind) -> IoError {
 /// A mode specifies how a file should be opened or created. These modes are
 /// passed to `File::open_mode` and are used to control where the file is
 /// positioned when it is initially opened.
-#[deriving(Copy)]
+#[deriving(Copy, Clone, PartialEq, Eq)]
 pub enum FileMode {
     /// Opens a file positioned at the beginning.
     Open,
@@ -1736,7 +1736,7 @@ pub enum FileMode {
 
 /// Access permissions with which the file should be opened. `File`s
 /// opened with `Read` will return an error if written to.
-#[deriving(Copy)]
+#[deriving(Copy, Clone, PartialEq, Eq)]
 pub enum FileAccess {
     /// Read-only access, requests to write will result in an error
     Read,