about summary refs log tree commit diff
path: root/src/libstd/sys
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/libstd/sys
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/libstd/sys')
-rw-r--r--src/libstd/sys/common/wtf8.rs2
-rw-r--r--src/libstd/sys/windows/os.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs
index fb9d6fef1fa..6cae127441c 100644
--- a/src/libstd/sys/common/wtf8.rs
+++ b/src/libstd/sys/common/wtf8.rs
@@ -43,7 +43,7 @@ use sys_common::AsInner;
 use unicode::str::{Utf16Item, utf16_items};
 use vec::Vec;
 
-static UTF8_REPLACEMENT_CHARACTER: &'static [u8] = b"\xEF\xBF\xBD";
+const UTF8_REPLACEMENT_CHARACTER: &'static [u8] = b"\xEF\xBF\xBD";
 
 /// A Unicode code point: from U+0000 to U+10FFFF.
 ///
diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs
index 587ab7924fd..89cf8a08a68 100644
--- a/src/libstd/sys/windows/os.rs
+++ b/src/libstd/sys/windows/os.rs
@@ -59,8 +59,8 @@ pub fn error_string(errnum: i32) -> String {
                           -> DWORD;
     }
 
-    static FORMAT_MESSAGE_FROM_SYSTEM: DWORD = 0x00001000;
-    static FORMAT_MESSAGE_IGNORE_INSERTS: DWORD = 0x00000200;
+    const FORMAT_MESSAGE_FROM_SYSTEM: DWORD = 0x00001000;
+    const FORMAT_MESSAGE_IGNORE_INSERTS: DWORD = 0x00000200;
 
     // This value is calculated from the macro
     // MAKELANGID(LANG_SYSTEM_DEFAULT, SUBLANG_SYS_DEFAULT)