Skip to content

Commit 85c9fc6

Browse files
committed
librustc: Remove the const declaration form everywhere
1 parent eba3367 commit 85c9fc6

File tree

157 files changed

+1061
-1063
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+1061
-1063
lines changed

src/libcore/flate.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ pub mod rustrt {
4141
}
4242
}
4343

44-
const lz_none : c_int = 0x0; // Huffman-coding only.
45-
const lz_fast : c_int = 0x1; // LZ with only one probe
46-
const lz_norm : c_int = 0x80; // LZ with 128 probes, "normal"
47-
const lz_best : c_int = 0xfff; // LZ with 4095 probes, "best"
44+
static lz_none : c_int = 0x0; // Huffman-coding only.
45+
static lz_fast : c_int = 0x1; // LZ with only one probe
46+
static lz_norm : c_int = 0x80; // LZ with 128 probes, "normal"
47+
static lz_best : c_int = 0xfff; // LZ with 4095 probes, "best"
4848

4949
pub fn deflate_bytes(bytes: &[const u8]) -> ~[u8] {
5050
do vec::as_const_buf(bytes) |b, len| {

src/libcore/gc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,11 @@ unsafe fn find_segment_for_frame(fp: *Word, segment: *StackSegment)
211211

212212
type Memory = uint;
213213

214-
const task_local_heap: Memory = 1;
215-
const exchange_heap: Memory = 2;
216-
const stack: Memory = 4;
214+
static task_local_heap: Memory = 1;
215+
static exchange_heap: Memory = 2;
216+
static stack: Memory = 4;
217217

218-
const need_cleanup: Memory = exchange_heap | stack;
218+
static need_cleanup: Memory = exchange_heap | stack;
219219

220220
// Walks stack, searching for roots of the requested type, and passes
221221
// each root to the visitor.

src/libcore/hashmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub mod linear {
2525
use uint;
2626
use vec;
2727

28-
const INITIAL_CAPACITY: uint = 32u; // 2^5
28+
static INITIAL_CAPACITY: uint = 32u; // 2^5
2929

3030
struct Bucket<K,V> {
3131
hash: uint,

0 commit comments

Comments
 (0)