]> git.lizzy.rs Git - rust.git/commitdiff
rollup merge of #18691 : subhashb/add_clone_trait_to_filetype
authorAlex Crichton <alex@alexcrichton.com>
Thu, 6 Nov 2014 21:36:33 +0000 (13:36 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 6 Nov 2014 21:53:27 +0000 (13:53 -0800)
src/libstd/io/mod.rs
src/test/run-pass/issue-18619.rs [new file with mode: 0644]

index ba5034da5a8aa5fcd8d51090a5e6e11cc5c28075..c404741b7c31ad4aa14302c2f128f905191d5e09 100644 (file)
@@ -1737,7 +1737,7 @@ pub enum FileAccess {
 }
 
 /// Different kinds of files which can be identified by a call to stat
-#[deriving(PartialEq, Show, Hash)]
+#[deriving(PartialEq, Show, Hash, Clone)]
 pub enum FileType {
     /// This is a normal file, corresponding to `S_IFREG`
     TypeFile,
diff --git a/src/test/run-pass/issue-18619.rs b/src/test/run-pass/issue-18619.rs
new file mode 100644 (file)
index 0000000..70ccc20
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::io::FileType;
+
+pub fn main() {
+    let _ = FileType::TypeFile.clone();
+}