]> git.lizzy.rs Git - rust.git/commitdiff
avoid using match keyword as module name
authorNiv Kaminer <nivkner@zoho.com>
Wed, 4 Oct 2017 16:17:25 +0000 (16:17 +0000)
committerNiv Kaminer <nivkner@zoho.com>
Wed, 4 Oct 2017 16:17:25 +0000 (16:17 +0000)
src/librustc/benches/lib.rs
src/librustc/benches/match.rs [deleted file]
src/librustc/benches/pattern.rs [new file with mode: 0644]

index 98e1d92127b5a179c9d09a8f58c96d344a353ec3..24294ec49ceed58e243f1029e3d4cd7fb6b8aaae 100644 (file)
@@ -16,4 +16,4 @@
 extern crate test;
 
 mod dispatch;
-mod match;
+mod pattern;
diff --git a/src/librustc/benches/match.rs b/src/librustc/benches/match.rs
deleted file mode 100644 (file)
index 638b1ce..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2017 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 test::Bencher;
-
-// Overhead of various match forms
-
-#[bench]
-fn option_some(b: &mut Bencher) {
-    let x = Some(10);
-    b.iter(|| {
-        match x {
-            Some(y) => y,
-            None => 11
-        }
-    });
-}
-
-#[bench]
-fn vec_pattern(b: &mut Bencher) {
-    let x = [1,2,3,4,5,6];
-    b.iter(|| {
-        match x {
-            [1,2,3,..] => 10,
-            _ => 11,
-        }
-    });
-}
diff --git a/src/librustc/benches/pattern.rs b/src/librustc/benches/pattern.rs
new file mode 100644 (file)
index 0000000..638b1ce
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright 2017 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 test::Bencher;
+
+// Overhead of various match forms
+
+#[bench]
+fn option_some(b: &mut Bencher) {
+    let x = Some(10);
+    b.iter(|| {
+        match x {
+            Some(y) => y,
+            None => 11
+        }
+    });
+}
+
+#[bench]
+fn vec_pattern(b: &mut Bencher) {
+    let x = [1,2,3,4,5,6];
+    b.iter(|| {
+        match x {
+            [1,2,3,..] => 10,
+            _ => 11,
+        }
+    });
+}