Skip to content

Commit c920443

Browse files
committed
---
yaml --- r: 95606 b: refs/heads/dist-snap c: 142672d h: refs/heads/master v: v3
1 parent dc04a14 commit c920443

File tree

249 files changed

+976
-1092
lines changed

Some content is hidden

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

249 files changed

+976
-1092
lines changed

[refs]

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

branches/dist-snap/src/etc/combine-tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def scrub(b):
4040
i = 0
4141
c.write("// AUTO-GENERATED FILE: DO NOT EDIT\n")
4242
c.write("#[link(name=\"run_pass_stage2\", vers=\"0.1\")];\n")
43-
c.write("#[feature(globs, macro_rules, struct_variant)];\n")
43+
c.write("#[feature(globs, macro_rules, struct_variant, managed_boxes)];\n")
4444
for t in stage2_tests:
4545
p = os.path.join(run_pass, t)
4646
p = p.replace("\\", "\\\\")
@@ -52,7 +52,7 @@ def scrub(b):
5252

5353
d = open("tmp/run_pass_stage2_driver.rs", "w")
5454
d.write("// AUTO-GENERATED FILE: DO NOT EDIT\n")
55-
d.write("#[feature(globs)];\n")
55+
d.write("#[feature(globs, managed_boxes)];\n")
5656
d.write("extern mod extra;\n")
5757
d.write("extern mod run_pass_stage2;\n")
5858
d.write("use run_pass_stage2::*;\n")

branches/dist-snap/src/etc/extract-tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
#[ allow(unused_variable) ];\n
6464
#[ allow(dead_assignment) ];\n
6565
#[ allow(unused_mut) ];\n
66-
#[ feature(macro_rules, globs, struct_variant) ];\n
66+
#[ feature(macro_rules, globs, struct_variant, managed_boxes) ];\n
6767
""" + block
6868
if xfail:
6969
block = "// xfail-test\n" + block

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ mod test {
318318
use std::vec;
319319
320320
do 1000.times {
321-
let times = task_rng().gen_range(1u, 100);
321+
let times = task_rng().gen_integer_range(1u, 100);
322322
let v = vec::from_fn(times, |_| random::<u8>());
323323
assert_eq!(v.to_base64(STANDARD).from_base64().unwrap(), v);
324324
}

branches/dist-snap/src/libextra/crypto/cryptoutil.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ pub mod test {
365365
digest.reset();
366366

367367
while count < total_size {
368-
let next: uint = rng.gen_range(0, 2 * blocksize + 1);
368+
let next: uint = rng.gen_integer_range(0, 2 * blocksize + 1);
369369
let remaining = total_size - count;
370370
let size = if next > remaining { remaining } else { next };
371371
digest.input(buffer.slice_to(size));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Rust extras are part of the standard Rust distribution.
3333
#[license = "MIT/ASL2"];
3434
#[crate_type = "lib"];
3535

36-
#[feature(macro_rules, globs)];
36+
#[feature(macro_rules, globs, managed_boxes)];
3737

3838
#[deny(non_camel_case_types)];
3939
#[deny(missing_doc)];

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ mod tests {
113113
let mut r = rand::rng();
114114
let mut words = ~[];
115115
do 20.times {
116-
let range = r.gen_range(1u, 10);
116+
let range = r.gen_integer_range(1u, 10);
117117
words.push(r.gen_vec::<u8>(range));
118118
}
119119
do 20.times {

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,8 +1069,8 @@ mod big_tests {
10691069
isSorted(arr);
10701070

10711071
do 3.times {
1072-
let i1 = rng.gen_range(0u, n);
1073-
let i2 = rng.gen_range(0u, n);
1072+
let i1 = rng.gen_integer_range(0u, n);
1073+
let i2 = rng.gen_integer_range(0u, n);
10741074
arr.swap(i1, i2);
10751075
}
10761076
tim_sort(arr); // 3sort
@@ -1088,7 +1088,7 @@ mod big_tests {
10881088
isSorted(arr);
10891089

10901090
do (n/100).times {
1091-
let idx = rng.gen_range(0u, n);
1091+
let idx = rng.gen_integer_range(0u, n);
10921092
arr[idx] = rng.gen();
10931093
}
10941094
tim_sort(arr);
@@ -1141,8 +1141,8 @@ mod big_tests {
11411141
isSorted(arr);
11421142

11431143
do 3.times {
1144-
let i1 = rng.gen_range(0u, n);
1145-
let i2 = rng.gen_range(0u, n);
1144+
let i1 = rng.gen_integer_range(0u, n);
1145+
let i2 = rng.gen_integer_range(0u, n);
11461146
arr.swap(i1, i2);
11471147
}
11481148
tim_sort(arr); // 3sort
@@ -1160,7 +1160,7 @@ mod big_tests {
11601160
isSorted(arr);
11611161

11621162
do (n/100).times {
1163-
let idx = rng.gen_range(0u, n);
1163+
let idx = rng.gen_integer_range(0u, n);
11641164
arr[idx] = @rng.gen();
11651165
}
11661166
tim_sort(arr);

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub mod rustrt {
3434
3535

3636
#[deriving(Clone, DeepClone, Eq, Encodable, Decodable)]
37-
pub struct Timespec { sec: i64, nsec: i32 }
37+
pub struct Timespec { priv sec: i64, priv nsec: i32 }
3838
/*
3939
* Timespec assumes that pre-epoch Timespecs have negative sec and positive
4040
* nsec fields. Darwin's and Linux's struct timespec functions handle pre-
@@ -106,18 +106,18 @@ pub fn tzset() {
106106

107107
#[deriving(Clone, DeepClone, Eq, Encodable, Decodable)]
108108
pub struct Tm {
109-
tm_sec: i32, // seconds after the minute ~[0-60]
110-
tm_min: i32, // minutes after the hour ~[0-59]
111-
tm_hour: i32, // hours after midnight ~[0-23]
112-
tm_mday: i32, // days of the month ~[1-31]
113-
tm_mon: i32, // months since January ~[0-11]
114-
tm_year: i32, // years since 1900
115-
tm_wday: i32, // days since Sunday ~[0-6]
116-
tm_yday: i32, // days since January 1 ~[0-365]
117-
tm_isdst: i32, // Daylight Savings Time flag
118-
tm_gmtoff: i32, // offset from UTC in seconds
119-
tm_zone: ~str, // timezone abbreviation
120-
tm_nsec: i32, // nanoseconds
109+
priv tm_sec: i32, // seconds after the minute ~[0-60]
110+
priv tm_min: i32, // minutes after the hour ~[0-59]
111+
priv tm_hour: i32, // hours after midnight ~[0-23]
112+
priv tm_mday: i32, // days of the month ~[1-31]
113+
priv tm_mon: i32, // months since January ~[0-11]
114+
priv tm_year: i32, // years since 1900
115+
priv tm_wday: i32, // days since Sunday ~[0-6]
116+
priv tm_yday: i32, // days since January 1 ~[0-365]
117+
priv tm_isdst: i32, // Daylight Savings Time flag
118+
priv tm_gmtoff: i32, // offset from UTC in seconds
119+
priv tm_zone: ~str, // timezone abbreviation
120+
priv tm_nsec: i32, // nanoseconds
121121
}
122122

123123
pub fn empty_tm() -> Tm {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ mod test_treemap {
10281028
}
10291029

10301030
do 30.times {
1031-
let r = rng.gen_range(0, ctrl.len());
1031+
let r = rng.gen_integer_range(0, ctrl.len());
10321032
let (key, _) = ctrl.remove(r);
10331033
assert!(map.remove(&key));
10341034
check_structure(&map);

branches/dist-snap/src/librustc/front/feature_gate.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ impl Visitor<()> for Context {
138138
experimental and likely to be removed");
139139

140140
},
141-
// NOTE: enable after snapshot
142-
ast::ty_box(_) if false => {
141+
ast::ty_box(_) => {
143142
self.gate_feature("managed_boxes", t.span, "The managed box syntax may be replaced \
144143
by a library type, and a garbage \
145144
collector is not yet implemented. \

branches/dist-snap/src/librustc/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#[license = "MIT/ASL2"];
1818
#[crate_type = "lib"];
1919

20-
#[feature(macro_rules, globs, struct_variant)];
20+
#[feature(macro_rules, globs, struct_variant, managed_boxes)];
2121

2222
// Rustc tasks always run on a fixed_stack_segment, so code in this
2323
// module can call C functions (in particular, LLVM functions) with

branches/dist-snap/src/librustdoc/rustdoc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#[license = "MIT/ASL2"];
1818
#[crate_type = "lib"];
1919

20-
#[feature(globs, struct_variant)];
20+
#[feature(globs, struct_variant, managed_boxes)];
2121

2222
extern mod syntax;
2323
extern mod rustc;

branches/dist-snap/src/librustpkg/conditions.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212

1313
pub use std::path::Path;
1414
pub use package_id::PkgId;
15-
pub use std::rt::io::FileStat;
15+
pub use std::libc;
16+
pub use std::libc::stat;
1617

1718
condition! {
1819
pub bad_path: (Path, ~str) -> Path;
1920
}
2021

2122
condition! {
22-
pub bad_stat: (Path, ~str) -> FileStat;
23+
pub bad_stat: (Path, ~str) -> stat;
2324
}
2425

2526
condition! {

branches/dist-snap/src/librustpkg/rustpkg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#[license = "MIT/ASL2"];
1919
#[crate_type = "lib"];
2020

21-
#[feature(globs)];
21+
#[feature(globs, managed_boxes)];
2222

2323
extern mod extra;
2424
extern mod rustc;

branches/dist-snap/src/librustpkg/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -625,7 +625,7 @@ fn debug_flags() -> ~[~str] { ~[] }
625625
/// Returns the last-modified date as an Option
626626
pub fn datestamp(p: &Path) -> Option<libc::time_t> {
627627
debug!("Scrutinizing datestamp for {} - does it exist? {:?}", p.display(), os::path_exists(p));
628-
let out = p.stat().map(|stat| stat.modified);
628+
let out = p.stat().map(|stat| stat.st_mtime);
629629
debug!("Date = {:?}", out);
630630
out.map(|t| { t as libc::time_t })
631631
}

branches/dist-snap/src/librustpkg/workcache_support.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ pub fn digest_file_with_date(path: &Path) -> ~str {
1818
use conditions::bad_path::cond;
1919
use cond1 = conditions::bad_stat::cond;
2020

21+
let mut sha = ~Sha1::new();
2122
let s = io::read_whole_file_str(path);
2223
match s {
2324
Ok(s) => {
24-
let mut sha = Sha1::new();
25-
sha.input_str(s);
25+
(*sha).input_str(s);
2626
let st = match path.stat() {
2727
Some(st) => st,
2828
None => cond1.raise((path.clone(), format!("Couldn't get file access time")))
2929
};
30-
sha.input_str(st.modified.to_str());
31-
sha.result_str()
30+
(*sha).input_str(st.st_mtime.to_str());
31+
(*sha).result_str()
3232
}
3333
Err(e) => {
3434
let path = cond.raise((path.clone(), format!("Couldn't read file: {}", e)));
@@ -43,13 +43,13 @@ pub fn digest_file_with_date(path: &Path) -> ~str {
4343
pub fn digest_only_date(path: &Path) -> ~str {
4444
use cond = conditions::bad_stat::cond;
4545

46-
let mut sha = Sha1::new();
46+
let mut sha = ~Sha1::new();
4747
let st = match path.stat() {
4848
Some(st) => st,
4949
None => cond.raise((path.clone(), format!("Couldn't get file access time")))
5050
};
51-
sha.input_str(st.modified.to_str());
52-
sha.result_str()
51+
(*sha).input_str(st.st_mtime.to_str());
52+
(*sha).result_str()
5353
}
5454

5555
/// Adds multiple discovered outputs

0 commit comments

Comments
 (0)