Skip to content

Commit 5513dc3

Browse files
committed
---
yaml --- r: 137690 b: refs/heads/auto c: ab5935c h: refs/heads/master v: v3
1 parent 824a74a commit 5513dc3

File tree

10 files changed

+131
-131
lines changed

10 files changed

+131
-131
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: d9874bfb4079876dabc092c035d99b2d5b7f8a1c
16+
refs/heads/auto: ab5935c88d259d511561ccb4177bb6924dab4a06
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libstd/bitflags.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
/// ```{.rust}
2525
/// bitflags! {
2626
/// flags Flags: u32 {
27-
/// static FLAG_A = 0x00000001,
28-
/// static FLAG_B = 0x00000010,
29-
/// static FLAG_C = 0x00000100,
30-
/// static FLAG_ABC = FLAG_A.bits
31-
/// | FLAG_B.bits
32-
/// | FLAG_C.bits,
27+
/// const FLAG_A = 0x00000001,
28+
/// const FLAG_B = 0x00000010,
29+
/// const FLAG_C = 0x00000100,
30+
/// const FLAG_ABC = FLAG_A.bits
31+
/// | FLAG_B.bits
32+
/// | FLAG_C.bits,
3333
/// }
3434
/// }
3535
///
@@ -50,8 +50,8 @@
5050
///
5151
/// bitflags! {
5252
/// flags Flags: u32 {
53-
/// static FLAG_A = 0x00000001,
54-
/// static FLAG_B = 0x00000010,
53+
/// const FLAG_A = 0x00000001,
54+
/// const FLAG_B = 0x00000010,
5555
/// }
5656
/// }
5757
///
@@ -115,15 +115,15 @@
115115
#[macro_export]
116116
macro_rules! bitflags {
117117
($(#[$attr:meta])* flags $BitFlags:ident: $T:ty {
118-
$($(#[$Flag_attr:meta])* static $Flag:ident = $value:expr),+
118+
$($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr),+
119119
}) => {
120120
#[deriving(PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
121121
$(#[$attr])*
122122
pub struct $BitFlags {
123123
bits: $T,
124124
}
125125

126-
$($(#[$Flag_attr])* pub static $Flag: $BitFlags = $BitFlags { bits: $value };)+
126+
$($(#[$Flag_attr])* pub const $Flag: $BitFlags = $BitFlags { bits: $value };)+
127127

128128
impl $BitFlags {
129129
/// Returns an empty set of flags.
@@ -235,12 +235,12 @@ macro_rules! bitflags {
235235
}
236236
};
237237
($(#[$attr:meta])* flags $BitFlags:ident: $T:ty {
238-
$($(#[$Flag_attr:meta])* static $Flag:ident = $value:expr),+,
238+
$($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr),+,
239239
}) => {
240240
bitflags! {
241241
$(#[$attr])*
242242
flags $BitFlags: $T {
243-
$($(#[$Flag_attr])* static $Flag = $value),+
243+
$($(#[$Flag_attr])* const $Flag = $value),+
244244
}
245245
}
246246
};
@@ -259,22 +259,22 @@ mod tests {
259259
#[doc = "> "]
260260
#[doc = "> - Richard Feynman"]
261261
flags Flags: u32 {
262-
static FlagA = 0x00000001,
262+
const FlagA = 0x00000001,
263263
#[doc = "<pcwalton> macros are way better at generating code than trans is"]
264-
static FlagB = 0x00000010,
265-
static FlagC = 0x00000100,
264+
const FlagB = 0x00000010,
265+
const FlagC = 0x00000100,
266266
#[doc = "* cmr bed"]
267267
#[doc = "* strcat table"]
268268
#[doc = "<strcat> wait what?"]
269-
static FlagABC = FlagA.bits
269+
const FlagABC = FlagA.bits
270270
| FlagB.bits
271271
| FlagC.bits,
272272
}
273273
}
274274

275275
bitflags! {
276276
flags AnotherSetOfFlags: uint {
277-
static AnotherFlag = 1u,
277+
const AnotherFlag = 1u,
278278
}
279279
}
280280

branches/auto/src/libstd/collections/hashmap/map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ use super::table::{
4141
SafeHash
4242
};
4343

44-
static INITIAL_LOG2_CAP: uint = 5;
45-
pub static INITIAL_CAPACITY: uint = 1 << INITIAL_LOG2_CAP; // 2^5
44+
const INITIAL_LOG2_CAP: uint = 5;
45+
pub const INITIAL_CAPACITY: uint = 1 << INITIAL_LOG2_CAP; // 2^5
4646

4747
/// The default behavior of HashMap implements a load factor of 90.9%.
4848
/// This behavior is characterized by the following conditions:

branches/auto/src/libstd/collections/hashmap/table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use ptr::{RawPtr, copy_nonoverlapping_memory, zero_memory};
2424
use ptr;
2525
use rt::heap::{allocate, deallocate};
2626

27-
static EMPTY_BUCKET: u64 = 0u64;
27+
const EMPTY_BUCKET: u64 = 0u64;
2828

2929
/// The raw hashtable, providing safe-ish access to the unzipped and highly
3030
/// optimized arrays of hashes, keys, and values.

branches/auto/src/libstd/io/mod.rs

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ pub mod util;
283283
/// The default buffer size for various I/O operations
284284
// libuv recommends 64k buffers to maximize throughput
285285
// https://groups.google.com/forum/#!topic/libuv/oQO1HJAIDdA
286-
static DEFAULT_BUF_SIZE: uint = 1024 * 64;
286+
const DEFAULT_BUF_SIZE: uint = 1024 * 64;
287287

288288
/// A convenient typedef of the return value of any I/O action.
289289
pub type IoResult<T> = Result<T, IoError>;
@@ -1803,93 +1803,93 @@ bitflags! {
18031803
#[doc = "A set of permissions for a file or directory is represented"]
18041804
#[doc = "by a set of flags which are or'd together."]
18051805
flags FilePermission: u32 {
1806-
static USER_READ = 0o400,
1807-
static USER_WRITE = 0o200,
1808-
static USER_EXECUTE = 0o100,
1809-
static GROUP_READ = 0o040,
1810-
static GROUP_WRITE = 0o020,
1811-
static GROUP_EXECUTE = 0o010,
1812-
static OTHER_READ = 0o004,
1813-
static OTHER_WRITE = 0o002,
1814-
static OTHER_EXECUTE = 0o001,
1815-
1816-
static USER_RWX = USER_READ.bits | USER_WRITE.bits | USER_EXECUTE.bits,
1817-
static GROUP_RWX = GROUP_READ.bits | GROUP_WRITE.bits | GROUP_EXECUTE.bits,
1818-
static OTHER_RWX = OTHER_READ.bits | OTHER_WRITE.bits | OTHER_EXECUTE.bits,
1806+
const USER_READ = 0o400,
1807+
const USER_WRITE = 0o200,
1808+
const USER_EXECUTE = 0o100,
1809+
const GROUP_READ = 0o040,
1810+
const GROUP_WRITE = 0o020,
1811+
const GROUP_EXECUTE = 0o010,
1812+
const OTHER_READ = 0o004,
1813+
const OTHER_WRITE = 0o002,
1814+
const OTHER_EXECUTE = 0o001,
1815+
1816+
const USER_RWX = USER_READ.bits | USER_WRITE.bits | USER_EXECUTE.bits,
1817+
const GROUP_RWX = GROUP_READ.bits | GROUP_WRITE.bits | GROUP_EXECUTE.bits,
1818+
const OTHER_RWX = OTHER_READ.bits | OTHER_WRITE.bits | OTHER_EXECUTE.bits,
18191819

18201820
#[doc = "Permissions for user owned files, equivalent to 0644 on"]
18211821
#[doc = "unix-like systems."]
1822-
static USER_FILE = USER_READ.bits | USER_WRITE.bits | GROUP_READ.bits | OTHER_READ.bits,
1822+
const USER_FILE = USER_READ.bits | USER_WRITE.bits | GROUP_READ.bits | OTHER_READ.bits,
18231823

18241824
#[doc = "Permissions for user owned directories, equivalent to 0755 on"]
18251825
#[doc = "unix-like systems."]
1826-
static USER_DIR = USER_RWX.bits | GROUP_READ.bits | GROUP_EXECUTE.bits |
1826+
const USER_DIR = USER_RWX.bits | GROUP_READ.bits | GROUP_EXECUTE.bits |
18271827
OTHER_READ.bits | OTHER_EXECUTE.bits,
18281828

18291829
#[doc = "Permissions for user owned executables, equivalent to 0755"]
18301830
#[doc = "on unix-like systems."]
1831-
static USER_EXEC = USER_DIR.bits,
1831+
const USER_EXEC = USER_DIR.bits,
18321832

18331833
#[doc = "All possible permissions enabled."]
1834-
static ALL_PERMISSIONS = USER_RWX.bits | GROUP_RWX.bits | OTHER_RWX.bits,
1834+
const ALL_PERMISSIONS = USER_RWX.bits | GROUP_RWX.bits | OTHER_RWX.bits,
18351835

18361836
// Deprecated names
18371837
#[allow(non_uppercase_statics)]
18381838
#[deprecated = "use USER_READ instead"]
1839-
static UserRead = USER_READ.bits,
1839+
const UserRead = USER_READ.bits,
18401840
#[allow(non_uppercase_statics)]
18411841
#[deprecated = "use USER_WRITE instead"]
1842-
static UserWrite = USER_WRITE.bits,
1842+
const UserWrite = USER_WRITE.bits,
18431843
#[allow(non_uppercase_statics)]
18441844
#[deprecated = "use USER_EXECUTE instead"]
1845-
static UserExecute = USER_EXECUTE.bits,
1845+
const UserExecute = USER_EXECUTE.bits,
18461846
#[allow(non_uppercase_statics)]
18471847
#[deprecated = "use GROUP_READ instead"]
1848-
static GroupRead = GROUP_READ.bits,
1848+
const GroupRead = GROUP_READ.bits,
18491849
#[allow(non_uppercase_statics)]
18501850
#[deprecated = "use GROUP_WRITE instead"]
1851-
static GroupWrite = GROUP_WRITE.bits,
1851+
const GroupWrite = GROUP_WRITE.bits,
18521852
#[allow(non_uppercase_statics)]
18531853
#[deprecated = "use GROUP_EXECUTE instead"]
1854-
static GroupExecute = GROUP_EXECUTE.bits,
1854+
const GroupExecute = GROUP_EXECUTE.bits,
18551855
#[allow(non_uppercase_statics)]
18561856
#[deprecated = "use OTHER_READ instead"]
1857-
static OtherRead = OTHER_READ.bits,
1857+
const OtherRead = OTHER_READ.bits,
18581858
#[allow(non_uppercase_statics)]
18591859
#[deprecated = "use OTHER_WRITE instead"]
1860-
static OtherWrite = OTHER_WRITE.bits,
1860+
const OtherWrite = OTHER_WRITE.bits,
18611861
#[allow(non_uppercase_statics)]
18621862
#[deprecated = "use OTHER_EXECUTE instead"]
1863-
static OtherExecute = OTHER_EXECUTE.bits,
1863+
const OtherExecute = OTHER_EXECUTE.bits,
18641864

18651865
#[allow(non_uppercase_statics)]
18661866
#[deprecated = "use USER_RWX instead"]
1867-
static UserRWX = USER_RWX.bits,
1867+
const UserRWX = USER_RWX.bits,
18681868
#[allow(non_uppercase_statics)]
18691869
#[deprecated = "use GROUP_RWX instead"]
1870-
static GroupRWX = GROUP_RWX.bits,
1870+
const GroupRWX = GROUP_RWX.bits,
18711871
#[allow(non_uppercase_statics)]
18721872
#[deprecated = "use OTHER_RWX instead"]
1873-
static OtherRWX = OTHER_RWX.bits,
1873+
const OtherRWX = OTHER_RWX.bits,
18741874

18751875
#[doc = "Deprecated: use `USER_FILE` instead."]
18761876
#[allow(non_uppercase_statics)]
18771877
#[deprecated = "use USER_FILE instead"]
1878-
static UserFile = USER_FILE.bits,
1878+
const UserFile = USER_FILE.bits,
18791879

18801880
#[doc = "Deprecated: use `USER_DIR` instead."]
18811881
#[allow(non_uppercase_statics)]
18821882
#[deprecated = "use USER_DIR instead"]
1883-
static UserDir = USER_DIR.bits,
1883+
const UserDir = USER_DIR.bits,
18841884
#[doc = "Deprecated: use `USER_EXEC` instead."]
18851885
#[allow(non_uppercase_statics)]
18861886
#[deprecated = "use USER_EXEC instead"]
1887-
static UserExec = USER_EXEC.bits,
1887+
const UserExec = USER_EXEC.bits,
18881888

18891889
#[doc = "Deprecated: use `ALL_PERMISSIONS` instead"]
18901890
#[allow(non_uppercase_statics)]
18911891
#[deprecated = "use ALL_PERMISSIONS instead"]
1892-
static AllPermissions = ALL_PERMISSIONS.bits,
1892+
const AllPermissions = ALL_PERMISSIONS.bits,
18931893
}
18941894
}
18951895

branches/auto/src/libstd/io/process.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ use std::hash::sip::SipState;
3232

3333
/// Signal a process to exit, without forcibly killing it. Corresponds to
3434
/// SIGTERM on unix platforms.
35-
#[cfg(windows)] pub static PleaseExitSignal: int = 15;
35+
#[cfg(windows)] pub const PleaseExitSignal: int = 15;
3636
/// Signal a process to exit immediately, forcibly killing it. Corresponds to
3737
/// SIGKILL on unix platforms.
38-
#[cfg(windows)] pub static MustDieSignal: int = 9;
38+
#[cfg(windows)] pub const MustDieSignal: int = 9;
3939
/// Signal a process to exit, without forcibly killing it. Corresponds to
4040
/// SIGTERM on unix platforms.
41-
#[cfg(not(windows))] pub static PleaseExitSignal: int = libc::SIGTERM as int;
41+
#[cfg(not(windows))] pub const PleaseExitSignal: int = libc::SIGTERM as int;
4242
/// Signal a process to exit immediately, forcibly killing it. Corresponds to
4343
/// SIGKILL on unix platforms.
44-
#[cfg(not(windows))] pub static MustDieSignal: int = libc::SIGKILL as int;
44+
#[cfg(not(windows))] pub const MustDieSignal: int = libc::SIGKILL as int;
4545

4646
/// Representation of a running or exited child process.
4747
///

0 commit comments

Comments
 (0)