Skip to content

Commit c1241e8

Browse files
committed
---
yaml --- r: 146936 b: refs/heads/try2 c: 18ca312 h: refs/heads/master v: v3
1 parent 4550648 commit c1241e8

Some content is hidden

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

77 files changed

+1039
-1697
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: eeaf2e1ddc65e8307fd1ef7ad84ee51396c4d56e
8+
refs/heads/try2: 18ca312984b331b87b1a205b3cb954b16912ed82
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/compiletest/compiletest.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ pub fn parse_config(args: ~[~str]) -> config {
103103
}
104104

105105
fn opt_path(m: &getopts::Matches, nm: &str) -> Path {
106-
Path::init(m.opt_str(nm).unwrap())
106+
Path::new(m.opt_str(nm).unwrap())
107107
}
108108

109109
config {
110110
compile_lib_path: matches.opt_str("compile-lib-path").unwrap(),
111111
run_lib_path: matches.opt_str("run-lib-path").unwrap(),
112112
rustc_path: opt_path(matches, "rustc-path"),
113-
clang_path: matches.opt_str("clang-path").map(|s| Path::init(s)),
114-
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| Path::init(s)),
113+
clang_path: matches.opt_str("clang-path").map(|s| Path::new(s)),
114+
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| Path::new(s)),
115115
src_base: opt_path(matches, "src-base"),
116116
build_base: opt_path(matches, "build-base"),
117117
aux_base: opt_path(matches, "aux-base"),
@@ -124,10 +124,10 @@ pub fn parse_config(args: ~[~str]) -> config {
124124
} else {
125125
None
126126
},
127-
logfile: matches.opt_str("logfile").map(|s| Path::init(s)),
128-
save_metrics: matches.opt_str("save-metrics").map(|s| Path::init(s)),
127+
logfile: matches.opt_str("logfile").map(|s| Path::new(s)),
128+
save_metrics: matches.opt_str("save-metrics").map(|s| Path::new(s)),
129129
ratchet_metrics:
130-
matches.opt_str("ratchet-metrics").map(|s| Path::init(s)),
130+
matches.opt_str("ratchet-metrics").map(|s| Path::new(s)),
131131
ratchet_noise_percent:
132132
matches.opt_str("ratchet-noise-percent").and_then(|s| from_str::<f64>(s)),
133133
runtool: matches.opt_str("runtool"),

branches/try2/src/compiletest/header.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ fn parse_exec_env(line: &str) -> Option<(~str, ~str)> {
160160

161161
fn parse_pp_exact(line: &str, testfile: &Path) -> Option<Path> {
162162
match parse_name_value_directive(line, ~"pp-exact") {
163-
Some(s) => Some(Path::init(s)),
163+
Some(s) => Some(Path::new(s)),
164164
None => {
165165
if parse_name_directive(line, "pp-exact") {
166-
testfile.filename().map(|s| Path::init(s))
166+
testfile.filename().map(|s| Path::new(s))
167167
} else {
168168
None
169169
}

branches/try2/src/compiletest/runtest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub fn run_metrics(config: config, testfile: ~str, mm: &mut MetricMap) {
4545
// We're going to be dumping a lot of info. Start on a new line.
4646
print!("\n\n");
4747
}
48-
let testfile = Path::init(testfile);
48+
let testfile = Path::new(testfile);
4949
debug!("running {}", testfile.display());
5050
let props = load_props(&testfile);
5151
debug!("loaded props");
@@ -852,7 +852,7 @@ fn aux_output_dir_name(config: &config, testfile: &Path) -> Path {
852852
}
853853

854854
fn output_testname(testfile: &Path) -> Path {
855-
Path::init(testfile.filestem().unwrap())
855+
Path::new(testfile.filestem().unwrap())
856856
}
857857

858858
fn output_base_name(config: &config, testfile: &Path) -> Path {

branches/try2/src/libextra/glob.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub fn glob_with(pattern: &str, options: MatchOptions) -> GlobIterator {
9090

9191
// calculate root this way to handle volume-relative Windows paths correctly
9292
let mut root = os::getcwd();
93-
let pat_root = Path::init(pattern).root_path();
93+
let pat_root = Path::new(pattern).root_path();
9494
if pat_root.is_some() {
9595
if check_windows_verbatim(pat_root.get_ref()) {
9696
// XXX: How do we want to handle verbatim paths? I'm inclined to return nothing,
@@ -766,9 +766,9 @@ mod test {
766766

767767
#[test]
768768
fn test_matches_path() {
769-
// on windows, (Path::init("a/b").as_str().unwrap() == "a\\b"), so this
769+
// on windows, (Path::new("a/b").as_str().unwrap() == "a\\b"), so this
770770
// tests that / and \ are considered equivalent on windows
771-
assert!(Pattern::new("a/b").matches_path(&Path::init("a/b")));
771+
assert!(Pattern::new("a/b").matches_path(&Path::new("a/b")));
772772
}
773773
}
774774

branches/try2/src/libextra/json.rs

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub struct Error {
5454
/// The column number at which the error occurred
5555
priv col: uint,
5656
/// A message describing the type of the error
57-
priv msg: @~str,
57+
priv msg: ~str,
5858
}
5959

6060
fn escape_str(s: &str) -> ~str {
@@ -525,7 +525,7 @@ impl<T : Iterator<char>> Parser<T> {
525525
}
526526

527527
fn error<T>(&self, msg: ~str) -> Result<T, Error> {
528-
Err(Error { line: self.line, col: self.col, msg: @msg })
528+
Err(Error { line: self.line, col: self.col, msg: msg })
529529
}
530530

531531
fn parse_value(&mut self) -> Result<Json, Error> {
@@ -1327,7 +1327,7 @@ impl to_str::ToStr for Json {
13271327

13281328
impl to_str::ToStr for Error {
13291329
fn to_str(&self) -> ~str {
1330-
format!("{}:{}: {}", self.line, self.col, *self.msg)
1330+
format!("{}:{}: {}", self.line, self.col, self.msg)
13311331
}
13321332
}
13331333

@@ -1593,35 +1593,35 @@ mod tests {
15931593
#[test]
15941594
fn test_trailing_characters() {
15951595
assert_eq!(from_str("nulla"),
1596-
Err(Error {line: 1u, col: 5u, msg: @~"trailing characters"}));
1596+
Err(Error {line: 1u, col: 5u, msg: ~"trailing characters"}));
15971597
assert_eq!(from_str("truea"),
1598-
Err(Error {line: 1u, col: 5u, msg: @~"trailing characters"}));
1598+
Err(Error {line: 1u, col: 5u, msg: ~"trailing characters"}));
15991599
assert_eq!(from_str("falsea"),
1600-
Err(Error {line: 1u, col: 6u, msg: @~"trailing characters"}));
1600+
Err(Error {line: 1u, col: 6u, msg: ~"trailing characters"}));
16011601
assert_eq!(from_str("1a"),
1602-
Err(Error {line: 1u, col: 2u, msg: @~"trailing characters"}));
1602+
Err(Error {line: 1u, col: 2u, msg: ~"trailing characters"}));
16031603
assert_eq!(from_str("[]a"),
1604-
Err(Error {line: 1u, col: 3u, msg: @~"trailing characters"}));
1604+
Err(Error {line: 1u, col: 3u, msg: ~"trailing characters"}));
16051605
assert_eq!(from_str("{}a"),
1606-
Err(Error {line: 1u, col: 3u, msg: @~"trailing characters"}));
1606+
Err(Error {line: 1u, col: 3u, msg: ~"trailing characters"}));
16071607
}
16081608
16091609
#[test]
16101610
fn test_read_identifiers() {
16111611
assert_eq!(from_str("n"),
1612-
Err(Error {line: 1u, col: 2u, msg: @~"invalid syntax"}));
1612+
Err(Error {line: 1u, col: 2u, msg: ~"invalid syntax"}));
16131613
assert_eq!(from_str("nul"),
1614-
Err(Error {line: 1u, col: 4u, msg: @~"invalid syntax"}));
1614+
Err(Error {line: 1u, col: 4u, msg: ~"invalid syntax"}));
16151615
16161616
assert_eq!(from_str("t"),
1617-
Err(Error {line: 1u, col: 2u, msg: @~"invalid syntax"}));
1617+
Err(Error {line: 1u, col: 2u, msg: ~"invalid syntax"}));
16181618
assert_eq!(from_str("truz"),
1619-
Err(Error {line: 1u, col: 4u, msg: @~"invalid syntax"}));
1619+
Err(Error {line: 1u, col: 4u, msg: ~"invalid syntax"}));
16201620
16211621
assert_eq!(from_str("f"),
1622-
Err(Error {line: 1u, col: 2u, msg: @~"invalid syntax"}));
1622+
Err(Error {line: 1u, col: 2u, msg: ~"invalid syntax"}));
16231623
assert_eq!(from_str("faz"),
1624-
Err(Error {line: 1u, col: 3u, msg: @~"invalid syntax"}));
1624+
Err(Error {line: 1u, col: 3u, msg: ~"invalid syntax"}));
16251625
16261626
assert_eq!(from_str("null"), Ok(Null));
16271627
assert_eq!(from_str("true"), Ok(Boolean(true)));
@@ -1649,20 +1649,20 @@ mod tests {
16491649
#[test]
16501650
fn test_read_number() {
16511651
assert_eq!(from_str("+"),
1652-
Err(Error {line: 1u, col: 1u, msg: @~"invalid syntax"}));
1652+
Err(Error {line: 1u, col: 1u, msg: ~"invalid syntax"}));
16531653
assert_eq!(from_str("."),
1654-
Err(Error {line: 1u, col: 1u, msg: @~"invalid syntax"}));
1654+
Err(Error {line: 1u, col: 1u, msg: ~"invalid syntax"}));
16551655
16561656
assert_eq!(from_str("-"),
1657-
Err(Error {line: 1u, col: 2u, msg: @~"invalid number"}));
1657+
Err(Error {line: 1u, col: 2u, msg: ~"invalid number"}));
16581658
assert_eq!(from_str("00"),
1659-
Err(Error {line: 1u, col: 2u, msg: @~"invalid number"}));
1659+
Err(Error {line: 1u, col: 2u, msg: ~"invalid number"}));
16601660
assert_eq!(from_str("1."),
1661-
Err(Error {line: 1u, col: 3u, msg: @~"invalid number"}));
1661+
Err(Error {line: 1u, col: 3u, msg: ~"invalid number"}));
16621662
assert_eq!(from_str("1e"),
1663-
Err(Error {line: 1u, col: 3u, msg: @~"invalid number"}));
1663+
Err(Error {line: 1u, col: 3u, msg: ~"invalid number"}));
16641664
assert_eq!(from_str("1e+"),
1665-
Err(Error {line: 1u, col: 4u, msg: @~"invalid number"}));
1665+
Err(Error {line: 1u, col: 4u, msg: ~"invalid number"}));
16661666
16671667
assert_eq!(from_str("3"), Ok(Number(3.0)));
16681668
assert_eq!(from_str("3.1"), Ok(Number(3.1)));
@@ -1708,10 +1708,10 @@ mod tests {
17081708
#[test]
17091709
fn test_read_str() {
17101710
assert_eq!(from_str("\""),
1711-
Err(Error {line: 1u, col: 2u, msg: @~"EOF while parsing string"
1711+
Err(Error {line: 1u, col: 2u, msg: ~"EOF while parsing string"
17121712
}));
17131713
assert_eq!(from_str("\"lol"),
1714-
Err(Error {line: 1u, col: 5u, msg: @~"EOF while parsing string"
1714+
Err(Error {line: 1u, col: 5u, msg: ~"EOF while parsing string"
17151715
}));
17161716
17171717
assert_eq!(from_str("\"\""), Ok(String(~"")));
@@ -1768,15 +1768,15 @@ mod tests {
17681768
#[test]
17691769
fn test_read_list() {
17701770
assert_eq!(from_str("["),
1771-
Err(Error {line: 1u, col: 2u, msg: @~"EOF while parsing value"}));
1771+
Err(Error {line: 1u, col: 2u, msg: ~"EOF while parsing value"}));
17721772
assert_eq!(from_str("[1"),
1773-
Err(Error {line: 1u, col: 3u, msg: @~"EOF while parsing list"}));
1773+
Err(Error {line: 1u, col: 3u, msg: ~"EOF while parsing list"}));
17741774
assert_eq!(from_str("[1,"),
1775-
Err(Error {line: 1u, col: 4u, msg: @~"EOF while parsing value"}));
1775+
Err(Error {line: 1u, col: 4u, msg: ~"EOF while parsing value"}));
17761776
assert_eq!(from_str("[1,]"),
1777-
Err(Error {line: 1u, col: 4u, msg: @~"invalid syntax"}));
1777+
Err(Error {line: 1u, col: 4u, msg: ~"invalid syntax"}));
17781778
assert_eq!(from_str("[6 7]"),
1779-
Err(Error {line: 1u, col: 4u, msg: @~"expected `,` or `]`"}));
1779+
Err(Error {line: 1u, col: 4u, msg: ~"expected `,` or `]`"}));
17801780

17811781
assert_eq!(from_str("[]"), Ok(List(~[])));
17821782
assert_eq!(from_str("[ ]"), Ok(List(~[])));
@@ -1824,49 +1824,49 @@ mod tests {
18241824
Err(Error {
18251825
line: 1u,
18261826
col: 2u,
1827-
msg: @~"EOF while parsing object"}));
1827+
msg: ~"EOF while parsing object"}));
18281828
assert_eq!(from_str("{ "),
18291829
Err(Error {
18301830
line: 1u,
18311831
col: 3u,
1832-
msg: @~"EOF while parsing object"}));
1832+
msg: ~"EOF while parsing object"}));
18331833
assert_eq!(from_str("{1"),
18341834
Err(Error {
18351835
line: 1u,
18361836
col: 2u,
1837-
msg: @~"key must be a string"}));
1837+
msg: ~"key must be a string"}));
18381838
assert_eq!(from_str("{ \"a\""),
18391839
Err(Error {
18401840
line: 1u,
18411841
col: 6u,
1842-
msg: @~"EOF while parsing object"}));
1842+
msg: ~"EOF while parsing object"}));
18431843
assert_eq!(from_str("{\"a\""),
18441844
Err(Error {
18451845
line: 1u,
18461846
col: 5u,
1847-
msg: @~"EOF while parsing object"}));
1847+
msg: ~"EOF while parsing object"}));
18481848
assert_eq!(from_str("{\"a\" "),
18491849
Err(Error {
18501850
line: 1u,
18511851
col: 6u,
1852-
msg: @~"EOF while parsing object"}));
1852+
msg: ~"EOF while parsing object"}));
18531853
18541854
assert_eq!(from_str("{\"a\" 1"),
1855-
Err(Error {line: 1u, col: 6u, msg: @~"expected `:`"}));
1855+
Err(Error {line: 1u, col: 6u, msg: ~"expected `:`"}));
18561856
assert_eq!(from_str("{\"a\":"),
1857-
Err(Error {line: 1u, col: 6u, msg: @~"EOF while parsing value"}));
1857+
Err(Error {line: 1u, col: 6u, msg: ~"EOF while parsing value"}));
18581858
assert_eq!(from_str("{\"a\":1"),
18591859
Err(Error {
18601860
line: 1u,
18611861
col: 7u,
1862-
msg: @~"EOF while parsing object"}));
1862+
msg: ~"EOF while parsing object"}));
18631863
assert_eq!(from_str("{\"a\":1 1"),
1864-
Err(Error {line: 1u, col: 8u, msg: @~"expected `,` or `}`"}));
1864+
Err(Error {line: 1u, col: 8u, msg: ~"expected `,` or `}`"}));
18651865
assert_eq!(from_str("{\"a\":1,"),
18661866
Err(Error {
18671867
line: 1u,
18681868
col: 8u,
1869-
msg: @~"EOF while parsing object"}));
1869+
msg: ~"EOF while parsing object"}));
18701870
18711871
assert_eq!(from_str("{}").unwrap(), mk_object([]));
18721872
assert_eq!(from_str("{\"a\": 3}").unwrap(),
@@ -1966,7 +1966,7 @@ mod tests {
19661966
Err(Error {
19671967
line: 3u,
19681968
col: 8u,
1969-
msg: @~"EOF while parsing object"}));
1969+
msg: ~"EOF while parsing object"}));
19701970
}
19711971
19721972
#[deriving(Decodable)]

branches/try2/src/libextra/terminfo/searcher.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub fn get_dbpath_for_term(term: &str) -> Option<~Path> {
2929

3030
// Find search directory
3131
match getenv("TERMINFO") {
32-
Some(dir) => dirs_to_search.push(Path::init(dir)),
32+
Some(dir) => dirs_to_search.push(Path::new(dir)),
3333
None => {
3434
if homedir.is_some() {
3535
// ncurses compatability;
@@ -38,17 +38,17 @@ pub fn get_dbpath_for_term(term: &str) -> Option<~Path> {
3838
match getenv("TERMINFO_DIRS") {
3939
Some(dirs) => for i in dirs.split(':') {
4040
if i == "" {
41-
dirs_to_search.push(Path::init("/usr/share/terminfo"));
41+
dirs_to_search.push(Path::new("/usr/share/terminfo"));
4242
} else {
43-
dirs_to_search.push(Path::init(i.to_owned()));
43+
dirs_to_search.push(Path::new(i.to_owned()));
4444
}
4545
},
4646
// Found nothing, use the default paths
4747
// /usr/share/terminfo is the de facto location, but it seems
4848
// Ubuntu puts it in /lib/terminfo
4949
None => {
50-
dirs_to_search.push(Path::init("/usr/share/terminfo"));
51-
dirs_to_search.push(Path::init("/lib/terminfo"));
50+
dirs_to_search.push(Path::new("/usr/share/terminfo"));
51+
dirs_to_search.push(Path::new("/lib/terminfo"));
5252
}
5353
}
5454
}

branches/try2/src/libextra/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,20 +276,20 @@ pub fn parse_opts(args: &[~str]) -> Option<OptRes> {
276276
let run_ignored = matches.opt_present("ignored");
277277

278278
let logfile = matches.opt_str("logfile");
279-
let logfile = logfile.map(|s| Path::init(s));
279+
let logfile = logfile.map(|s| Path::new(s));
280280

281281
let run_benchmarks = matches.opt_present("bench");
282282
let run_tests = ! run_benchmarks ||
283283
matches.opt_present("test");
284284

285285
let ratchet_metrics = matches.opt_str("ratchet-metrics");
286-
let ratchet_metrics = ratchet_metrics.map(|s| Path::init(s));
286+
let ratchet_metrics = ratchet_metrics.map(|s| Path::new(s));
287287

288288
let ratchet_noise_percent = matches.opt_str("ratchet-noise-percent");
289289
let ratchet_noise_percent = ratchet_noise_percent.map(|s| from_str::<f64>(s).unwrap());
290290

291291
let save_metrics = matches.opt_str("save-metrics");
292-
let save_metrics = save_metrics.map(|s| Path::init(s));
292+
let save_metrics = save_metrics.map(|s| Path::new(s));
293293

294294
let test_shard = matches.opt_str("test-shard");
295295
let test_shard = opt_shard(test_shard);

0 commit comments

Comments
 (0)