Skip to content

Commit e38db9d

Browse files
committed
---
yaml --- r: 83909 b: refs/heads/dist-snap c: 1cee9d4 h: refs/heads/master i: 83907: c1cfec8 v: v3
1 parent ddda853 commit e38db9d

Some content is hidden

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

66 files changed

+1542
-544
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 0983ebe5310d4eb6d289f636f7ed0536c08bbc0e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 6ee8fee730b5a0ae20ee0968d87a1597908a62ba
9+
refs/heads/dist-snap: 1cee9d4c38c628914cc72277854bd97f4f017225
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/doc/rust.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,20 +1107,20 @@ The derived types are borrowed pointers with the `'static` lifetime,
11071107
fixed-size arrays, tuples, and structs.
11081108

11091109
~~~~
1110-
static bit1: uint = 1 << 0;
1111-
static bit2: uint = 1 << 1;
1110+
static BIT1: uint = 1 << 0;
1111+
static BIT2: uint = 1 << 1;
11121112
1113-
static bits: [uint, ..2] = [bit1, bit2];
1114-
static string: &'static str = "bitstring";
1113+
static BITS: [uint, ..2] = [BIT1, BIT2];
1114+
static STRING: &'static str = "bitstring";
11151115
11161116
struct BitsNStrings<'self> {
11171117
mybits: [uint, ..2],
11181118
mystring: &'self str
11191119
}
11201120
11211121
static bits_n_strings: BitsNStrings<'static> = BitsNStrings {
1122-
mybits: bits,
1123-
mystring: string
1122+
mybits: BITS,
1123+
mystring: STRING
11241124
};
11251125
~~~~
11261126

branches/dist-snap/doc/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ can specify a variable's type by following it with a colon, then the type
237237
name. Static items, on the other hand, always require a type annotation.
238238

239239
~~~~
240-
static monster_factor: float = 57.8;
241-
let monster_size = monster_factor * 10.0;
240+
static MONSTER_FACTOR: float = 57.8;
241+
let monster_size = MONSTER_FACTOR * 10.0;
242242
let monster_size: int = 50;
243243
~~~~
244244

branches/dist-snap/src/compiletest/runtest.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ fn run_rfail_test(config: &config, props: &TestProps, testfile: &Path) {
7979
};
8080
8181
// The value our Makefile configures valgrind to return on failure
82-
static valgrind_err: int = 100;
83-
if ProcRes.status == valgrind_err {
82+
static VALGRIND_ERR: int = 100;
83+
if ProcRes.status == VALGRIND_ERR {
8484
fatal_ProcRes(~"run-fail test isn't valgrind-clean!", &ProcRes);
8585
}
8686
@@ -102,8 +102,8 @@ fn run_rfail_test(config: &config, props: &TestProps, testfile: &Path) {
102102

103103
fn check_correct_failure_status(ProcRes: &ProcRes) {
104104
// The value the rust runtime returns on failure
105-
static rust_err: int = 101;
106-
if ProcRes.status != rust_err {
105+
static RUST_ERR: int = 101;
106+
if ProcRes.status != RUST_ERR {
107107
fatal_ProcRes(
108108
fmt!("failure produced the wrong error code: %d",
109109
ProcRes.status),

branches/dist-snap/src/etc/unicode.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ def emit_decomp_module(f, canon, compat):
250250
// The following code was generated by "src/etc/unicode.py"
251251
252252
#[allow(missing_doc)];
253+
#[allow(non_uppercase_statics)];
253254
254255
''')
255256

branches/dist-snap/src/libextra/bitv.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ mod tests {
872872
use std::rand;
873873
use std::rand::Rng;
874874

875-
static bench_bits : uint = 1 << 14;
875+
static BENCH_BITS : uint = 1 << 14;
876876

877877
#[test]
878878
fn test_to_str() {
@@ -1452,19 +1452,19 @@ mod tests {
14521452
fn bench_big_bitv_big(b: &mut BenchHarness) {
14531453
let mut r = rng();
14541454
let mut storage = ~[];
1455-
storage.grow(bench_bits / uint::bits, &0);
1455+
storage.grow(BENCH_BITS / uint::bits, &0);
14561456
let mut bitv = BigBitv::new(storage);
14571457
do b.iter {
1458-
bitv.set((r.next() as uint) % bench_bits, true);
1458+
bitv.set((r.next() as uint) % BENCH_BITS, true);
14591459
}
14601460
}
14611461

14621462
#[bench]
14631463
fn bench_bitv_big(b: &mut BenchHarness) {
14641464
let mut r = rng();
1465-
let mut bitv = Bitv::new(bench_bits, false);
1465+
let mut bitv = Bitv::new(BENCH_BITS, false);
14661466
do b.iter {
1467-
bitv.set((r.next() as uint) % bench_bits, true);
1467+
bitv.set((r.next() as uint) % BENCH_BITS, true);
14681468
}
14691469
}
14701470

@@ -1491,14 +1491,14 @@ mod tests {
14911491
let mut r = rng();
14921492
let mut bitv = BitvSet::new();
14931493
do b.iter {
1494-
bitv.insert((r.next() as uint) % bench_bits);
1494+
bitv.insert((r.next() as uint) % BENCH_BITS);
14951495
}
14961496
}
14971497

14981498
#[bench]
14991499
fn bench_bitv_big_union(b: &mut BenchHarness) {
1500-
let mut b1 = Bitv::new(bench_bits, false);
1501-
let b2 = Bitv::new(bench_bits, false);
1500+
let mut b1 = Bitv::new(BENCH_BITS, false);
1501+
let b2 = Bitv::new(BENCH_BITS, false);
15021502
do b.iter {
15031503
b1.union(&b2);
15041504
}

branches/dist-snap/src/libextra/deque.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::util::replace;
1515
use std::vec;
1616
use std::cast::transmute;
1717

18-
static initial_capacity: uint = 32u; // 2^5
18+
static INITIAL_CAPACITY: uint = 32u; // 2^5
1919

2020
#[allow(missing_doc)]
2121
pub struct Deque<T> {
@@ -47,7 +47,7 @@ impl<T> Deque<T> {
4747
/// Create an empty Deque
4848
pub fn new() -> Deque<T> {
4949
Deque{nelts: 0, lo: 0, hi: 0,
50-
elts: vec::from_fn(initial_capacity, |_| None)}
50+
elts: vec::from_fn(INITIAL_CAPACITY, |_| None)}
5151
}
5252

5353
/// Return a reference to the first element in the deque

branches/dist-snap/src/libextra/ebml.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ pub mod writer {
748748

749749
// Set to true to generate more debugging in EBML code.
750750
// Totally lame approach.
751-
static debug: bool = true;
751+
static DEBUG: bool = true;
752752

753753
impl Encoder {
754754
// used internally to emit things like the vector length and so on
@@ -764,7 +764,7 @@ pub mod writer {
764764
// efficiency. When debugging, though, we can emit such
765765
// labels and then they will be checked by decoder to
766766
// try and check failures more quickly.
767-
if debug { self.wr_tagged_str(EsLabel as uint, label) }
767+
if DEBUG { self.wr_tagged_str(EsLabel as uint, label) }
768768
}
769769
}
770770

branches/dist-snap/src/libextra/flate.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ pub mod rustrt {
3939
}
4040
}
4141

42-
static lz_none : c_int = 0x0; // Huffman-coding only.
43-
static lz_fast : c_int = 0x1; // LZ with only one probe
44-
static lz_norm : c_int = 0x80; // LZ with 128 probes, "normal"
45-
static lz_best : c_int = 0xfff; // LZ with 4095 probes, "best"
42+
static LZ_NONE : c_int = 0x0; // Huffman-coding only.
43+
static LZ_FAST : c_int = 0x1; // LZ with only one probe
44+
static LZ_NORM : c_int = 0x80; // LZ with 128 probes, "normal"
45+
static LZ_BEST : c_int = 0xfff; // LZ with 4095 probes, "best"
4646

4747
pub fn deflate_bytes(bytes: &[u8]) -> ~[u8] {
4848
do vec::as_imm_buf(bytes) |b, len| {
@@ -52,7 +52,7 @@ pub fn deflate_bytes(bytes: &[u8]) -> ~[u8] {
5252
rustrt::tdefl_compress_mem_to_heap(b as *c_void,
5353
len as size_t,
5454
&mut outsz,
55-
lz_norm);
55+
LZ_NORM);
5656
assert!(res as int != 0);
5757
let out = vec::raw::from_buf_raw(res as *u8,
5858
outsz as uint);

0 commit comments

Comments
 (0)