Permalink
Browse files

librustc: Remove the `const` declaration form everywhere

  • Loading branch information...
1 parent eba3367 commit 85c9fc6f8f59c146c44aacb4b9abfb2c35e16089 @pcwalton pcwalton committed Mar 22, 2013
Showing with 1,061 additions and 1,063 deletions.
  1. +4 −4 src/libcore/flate.rs
  2. +4 −4 src/libcore/gc.rs
  3. +1 −1 src/libcore/hashmap.rs
  4. +196 −196 src/libcore/libc.rs
  5. +3 −3 src/libcore/managed.rs
  6. +68 −68 src/libcore/num/cmath.rs
  7. +18 −18 src/libcore/num/f32.rs
  8. +26 −26 src/libcore/num/f64.rs
  9. +18 −18 src/libcore/num/float.rs
  10. +4 −4 src/libcore/num/int-template.rs
  11. +1 −1 src/libcore/num/int-template/i16.rs
  12. +1 −1 src/libcore/num/int-template/i32.rs
  13. +1 −1 src/libcore/num/int-template/i64.rs
  14. +1 −1 src/libcore/num/int-template/i8.rs
  15. +1 −1 src/libcore/num/int-template/int.rs
  16. +3 −3 src/libcore/num/strconv.rs
  17. +4 −4 src/libcore/num/uint-template.rs
  18. +1 −1 src/libcore/num/uint-template/u16.rs
  19. +1 −1 src/libcore/num/uint-template/u32.rs
  20. +1 −1 src/libcore/num/uint-template/u64.rs
  21. +1 −1 src/libcore/num/uint-template/u8.rs
  22. +2 −2 src/libcore/num/uint-template/uint.rs
  23. +30 −30 src/libcore/os.rs
  24. +1 −1 src/libcore/pipes.rs
  25. +1 −1 src/libcore/rand.rs
  26. +4 −4 src/libcore/rt/context.rs
  27. +3 −3 src/libcore/rt/sched.rs
  28. +1 −1 src/libcore/rt/thread_local_storage.rs
  29. +2 −2 src/libcore/rt/uv.rs
  30. +18 −18 src/libcore/str.rs
  31. +1 −1 src/libcore/task/mod.rs
  32. +3 −3 src/libcore/trie.rs
  33. +6 −6 src/libcore/unstable/extfmt.rs
  34. +1 −1 src/libcore/unstable/global.rs
  35. +2 −2 src/libcore/unstable/lang.rs
  36. +2 −2 src/libfuzzer/cycles.rs
  37. +2 −2 src/librust/rust.rc
  38. +36 −36 src/librustc/back/abi.rs
  39. +23 −23 src/librustc/driver/session.rs
  40. +1 −1 src/librustc/front/core_inject.rs
  41. +2 −2 src/librustc/front/test.rs
  42. +2 −2 src/librustc/lib/llvm.rs
  43. +61 −61 src/librustc/metadata/common.rs
  44. +1 −1 src/librustc/metadata/encoder.rs
  45. +1 −1 src/librustc/middle/kind.rs
  46. +3 −3 src/librustc/middle/liveness.rs
  47. +1 −1 src/librustc/middle/trans/build.rs
  48. +3 −3 src/librustc/middle/trans/common.rs
  49. +1 −1 src/librustc/middle/trans/consts.rs
  50. +26 −26 src/librustc/middle/trans/debuginfo.rs
  51. +3 −3 src/librustc/middle/trans/type_use.rs
  52. +30 −30 src/librustc/middle/ty.rs
  53. +2 −2 src/librustc/middle/typeck/astconv.rs
  54. +17 −17 src/librustc/middle/typeck/infer/resolve.rs
  55. +1 −1 src/librustc/middle/typeck/infer/test.rs
  56. +1 −1 src/librustdoc/demo.rs
  57. +1 −2 src/librustdoc/desc_to_brief_pass.rs
  58. +1 −1 src/librustdoc/extract.rs
  59. +1 −1 src/librustdoc/fold.rs
  60. +2 −2 src/librustdoc/markdown_pass.rs
  61. +1 −1 src/librustdoc/sort_item_type_pass.rs
  62. +1 −1 src/librustdoc/tystr_pass.rs
  63. +1 −1 src/librustpkg/util.rs
  64. +1 −1 src/libstd/arena.rs
  65. +25 −25 src/libstd/bigint.rs
  66. +1 −1 src/libstd/bitv.rs
  67. +1 −1 src/libstd/cmp.rs
  68. +1 −1 src/libstd/deque.rs
  69. +1 −1 src/libstd/ebml.rs
  70. +3 −3 src/libstd/flatpipes.rs
  71. +1 −1 src/libstd/oldmap.rs
  72. +2 −2 src/libstd/par.rs
  73. +2 −2 src/libstd/rope.rs
  74. +7 −7 src/libstd/sha1.rs
  75. +3 −3 src/libstd/sort.rs
  76. +18 −18 src/libstd/term.rs
  77. +2 −2 src/libstd/test.rs
  78. +3 −3 src/libstd/time.rs
  79. +131 −131 src/libstd/unicode.rs
  80. +2 −2 src/libsyntax/ast.rs
  81. +1 −1 src/libsyntax/ext/expand.rs
  82. +2 −2 src/libsyntax/parse/prec.rs
  83. +38 −38 src/libsyntax/parse/token.rs
  84. +1 −1 src/libsyntax/print/pp.rs
  85. +3 −3 src/libsyntax/print/pprust.rs
  86. +3 −3 src/test/auxiliary/cci_const.rs
  87. +3 −3 src/test/bench/shootout-nbody.rs
  88. +3 −3 src/test/bench/sudoku.rs
  89. +1 −1 src/test/compile-fail/bad-const-type.rs
  90. +1 −1 src/test/compile-fail/borrowck-assign-to-constants.rs
  91. +4 −4 src/test/compile-fail/const-cast-different-types.rs
  92. +3 −3 src/test/compile-fail/const-cast-wrong-type.rs
  93. +2 −2 src/test/compile-fail/const-recursive.rs
  94. +1 −1 src/test/compile-fail/issue-2478.rs
  95. +1 −1 src/test/compile-fail/issue-3521-2.rs
  96. +1 −1 src/test/compile-fail/issue-3668-2.rs
  97. +1 −1 src/test/compile-fail/issue-3668.rs
  98. +1 −1 src/test/compile-fail/issue-4523.rs
  99. +1 −1 src/test/compile-fail/issue-4968.rs
  100. +3 −3 src/test/compile-fail/regions-in-consts.rs
  101. +2 −2 src/test/run-pass-fulldeps/qquote.rs
  102. +1 −1 src/test/run-pass-fulldeps/quote-tokens.rs
  103. +4 −4 src/test/run-pass/conditional-compile.rs
  104. +2 −2 src/test/run-pass/const-autoderef-newtype.rs
  105. +4 −4 src/test/run-pass/const-autoderef.rs
  106. +3 −3 src/test/run-pass/const-big-enum.rs
  107. +1 −1 src/test/run-pass/const-cast-ptr-int.rs
  108. +4 −4 src/test/run-pass/const-cast.rs
  109. +2 −2 src/test/run-pass/const-const.rs
  110. +6 −6 src/test/run-pass/const-contents.rs
  111. +3 −3 src/test/run-pass/const-cross-crate-const.rs
  112. +1 −1 src/test/run-pass/const-cross-crate-extern.rs
  113. +4 −4 src/test/run-pass/const-deref.rs
  114. +1 −1 src/test/run-pass/const-enum-byref-self.rs
  115. +1 −1 src/test/run-pass/const-enum-byref.rs
  116. +4 −4 src/test/run-pass/const-enum-cast.rs
  117. +1 −1 src/test/run-pass/const-enum-ptr.rs
  118. +1 −1 src/test/run-pass/const-enum-struct.rs
  119. +1 −1 src/test/run-pass/const-enum-struct2.rs
  120. +1 −1 src/test/run-pass/const-enum-structlike.rs
  121. +1 −1 src/test/run-pass/const-enum-tuple.rs
  122. +1 −1 src/test/run-pass/const-enum-tuple2.rs
  123. +1 −1 src/test/run-pass/const-enum-tuplestruct.rs
  124. +1 −1 src/test/run-pass/const-enum-tuplestruct2.rs
  125. +3 −3 src/test/run-pass/const-enum-vec-index.rs
  126. +1 −1 src/test/run-pass/const-enum-vec-ptr.rs
  127. +1 −1 src/test/run-pass/const-enum-vector.rs
  128. +1 −1 src/test/run-pass/const-expr-in-fixed-length-vec.rs
  129. +1 −1 src/test/run-pass/const-expr-in-vec-repeat.rs
  130. +2 −2 src/test/run-pass/const-extern-function.rs
  131. +8 −9 src/test/run-pass/const-fields-and-indexing.rs
  132. +1 −1 src/test/run-pass/const-fn-val.rs
  133. +1 −1 src/test/run-pass/const-negative.rs
  134. +2 −2 src/test/run-pass/const-nullary-enum.rs
  135. +2 −2 src/test/run-pass/const-nullary-univariant-enum.rs
  136. +5 −5 src/test/run-pass/const-rec-and-tup.rs
  137. +2 −2 src/test/run-pass/const-region-ptrs-noncopy.rs
  138. +2 −2 src/test/run-pass/const-region-ptrs.rs
  139. +3 −3 src/test/run-pass/const-str-ptr.rs
  140. +3 −3 src/test/run-pass/const-struct.rs
  141. +1 −1 src/test/run-pass/const-tuple-struct.rs
  142. +1 −1 src/test/run-pass/const-unit-struct.rs
  143. +4 −4 src/test/run-pass/const-vec-of-fns.rs
  144. +2 −2 src/test/run-pass/const-vecs-and-slices.rs
  145. +1 −1 src/test/run-pass/const.rs
  146. +2 −2 src/test/run-pass/consts-in-patterns.rs
  147. +1 −1 src/test/run-pass/explicit-self.rs
  148. +1 −1 src/test/run-pass/export-glob-imports-target.rs
  149. +1 −1 src/test/run-pass/foreign-mod-unused-const.rs
  150. +1 −1 src/test/run-pass/issue-1660.rs
  151. +1 −1 src/test/run-pass/issue-2190-1.rs
  152. +1 −1 src/test/run-pass/issue-2428.rs
  153. +4 −4 src/test/run-pass/item-attributes.rs
  154. +1 −1 src/test/run-pass/mod-merge-hack-inst.rs
  155. +1 −1 src/test/run-pass/mod-merge-hack-template.rs
  156. +1 −1 src/test/run-pass/resolve-issue-2428.rs
  157. +10 −10 src/test/run-pass/shift.rs
View
@@ -41,10 +41,10 @@ pub mod rustrt {
}
}
-const lz_none : c_int = 0x0; // Huffman-coding only.
-const lz_fast : c_int = 0x1; // LZ with only one probe
-const lz_norm : c_int = 0x80; // LZ with 128 probes, "normal"
-const lz_best : c_int = 0xfff; // LZ with 4095 probes, "best"
+static lz_none : c_int = 0x0; // Huffman-coding only.
+static lz_fast : c_int = 0x1; // LZ with only one probe
+static lz_norm : c_int = 0x80; // LZ with 128 probes, "normal"
+static lz_best : c_int = 0xfff; // LZ with 4095 probes, "best"
pub fn deflate_bytes(bytes: &[const u8]) -> ~[u8] {
do vec::as_const_buf(bytes) |b, len| {
View
@@ -211,11 +211,11 @@ unsafe fn find_segment_for_frame(fp: *Word, segment: *StackSegment)
type Memory = uint;
-const task_local_heap: Memory = 1;
-const exchange_heap: Memory = 2;
-const stack: Memory = 4;
+static task_local_heap: Memory = 1;
+static exchange_heap: Memory = 2;
+static stack: Memory = 4;
-const need_cleanup: Memory = exchange_heap | stack;
+static need_cleanup: Memory = exchange_heap | stack;
// Walks stack, searching for roots of the requested type, and passes
// each root to the visitor.
View
@@ -25,7 +25,7 @@ pub mod linear {
use uint;
use vec;
- const INITIAL_CAPACITY: uint = 32u; // 2^5
+ static INITIAL_CAPACITY: uint = 32u; // 2^5
struct Bucket<K,V> {
hash: uint,
Oops, something went wrong.

0 comments on commit 85c9fc6

Please sign in to comment.