about summary refs log tree commit diff
path: root/src/libcoretest
diff options
context:
space:
mode:
authorFlorian Zeitz <florob@babelmonkeys.de>2015-02-27 15:36:53 +0100
committerFlorian Zeitz <florob@babelmonkeys.de>2015-03-02 17:11:51 +0100
commitf35f973cb700c444d8c029ee13b37dc16d560225 (patch)
tree7d87e40045e89a5d75001ef4b241840870b6aed7 /src/libcoretest
parent1cc8b6ec664f30b43f75551e95299d943c8a4e6a (diff)
downloadrust-f35f973cb700c444d8c029ee13b37dc16d560225.tar.gz
rust-f35f973cb700c444d8c029ee13b37dc16d560225.zip
Use `const`s instead of `static`s where appropriate
This changes the type of some public constants/statics in libunicode.
Notably some `&'static &'static [(char, char)]` have changed
to `&'static [(char, char)]`. The regexp crate seems to be the
sole user of these, yet this is technically a [breaking-change]
Diffstat (limited to 'src/libcoretest')
-rw-r--r--src/libcoretest/num/int_macros.rs10
-rw-r--r--src/libcoretest/num/uint_macros.rs10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/libcoretest/num/int_macros.rs b/src/libcoretest/num/int_macros.rs
index d1bfb475b07..fa41167cae8 100644
--- a/src/libcoretest/num/int_macros.rs
+++ b/src/libcoretest/num/int_macros.rs
@@ -70,12 +70,12 @@ mod tests {
         assert!(-(0b11 as $T) - (1 as $T) == (0b11 as $T).not());
     }
 
-    static A: $T = 0b0101100;
-    static B: $T = 0b0100001;
-    static C: $T = 0b1111001;
+    const A: $T = 0b0101100;
+    const B: $T = 0b0100001;
+    const C: $T = 0b1111001;
 
-    static _0: $T = 0;
-    static _1: $T = !0;
+    const _0: $T = 0;
+    const _1: $T = !0;
 
     #[test]
     fn test_count_ones() {
diff --git a/src/libcoretest/num/uint_macros.rs b/src/libcoretest/num/uint_macros.rs
index 5c6efc857f1..39e41a4fad3 100644
--- a/src/libcoretest/num/uint_macros.rs
+++ b/src/libcoretest/num/uint_macros.rs
@@ -38,12 +38,12 @@ mod tests {
         assert!(MAX - (0b1011 as $T) == (0b1011 as $T).not());
     }
 
-    static A: $T = 0b0101100;
-    static B: $T = 0b0100001;
-    static C: $T = 0b1111001;
+    const A: $T = 0b0101100;
+    const B: $T = 0b0100001;
+    const C: $T = 0b1111001;
 
-    static _0: $T = 0;
-    static _1: $T = !0;
+    const _0: $T = 0;
+    const _1: $T = !0;
 
     #[test]
     fn test_count_ones() {