Skip to content

Commit c384dda

Browse files
committed
---
yaml --- r: 151470 b: refs/heads/try2 c: 752048a h: refs/heads/master v: v3
1 parent b218e72 commit c384dda

File tree

18 files changed

+25
-12
lines changed

18 files changed

+25
-12
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: fa82ef23b800a10209732e1af2558eea87e218e8
8+
refs/heads/try2: 752048a27135bdf15c6f00229b04cea7ceeaf739
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/front/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ mod __test {
282282
#![!resolve_unexported]
283283
extern crate test (name = "test", vers = "...");
284284
fn main() {
285-
test::test_main_static(::os::args(), tests)
285+
test::test_main_static(::os::args().as_slice(), tests)
286286
}
287287
288288
static tests : &'static [test::TestDescAndFn] = &[
@@ -326,8 +326,8 @@ fn mk_test_module(cx: &TestCtxt) -> @ast::Item {
326326
let mainfn = (quote_item!(&cx.ext_cx,
327327
pub fn main() {
328328
#![main]
329-
#![allow(deprecated_owned_vector)]
330-
test::test_main_static(::std::os::args(), TESTS);
329+
use std::slice::Vector;
330+
test::test_main_static(::std::os::args().as_slice(), TESTS);
331331
}
332332
)).unwrap();
333333

branches/try2/src/librustdoc/html/format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ impl fmt::Show for clean::Type {
380380
"".to_owned()
381381
} else {
382382
let mut m = decl.bounds.iter().map(|s| s.to_str());
383-
": " + m.collect::<~[~str]>().connect(" + ")
383+
": " + m.collect::<Vec<~str>>().connect(" + ")
384384
},
385385
arrow = match decl.decl.output { clean::Unit => "no", _ => "yes" },
386386
ret = decl.decl.output)

branches/try2/src/librustdoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ local_data_key!(pub analysiskey: core::CrateAnalysis)
8585
type Output = (clean::Crate, Vec<plugins::PluginJson> );
8686

8787
pub fn main() {
88-
std::os::set_exit_status(main_args(std::os::args()));
88+
std::os::set_exit_status(main_args(std::os::args().as_slice()));
8989
}
9090

9191
pub fn opts() -> Vec<getopts::OptGroup> {

branches/try2/src/libstd/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,4 +278,7 @@ mod std {
278278
pub use ty;
279279
pub use unstable;
280280
pub use vec;
281+
282+
// The test runner requires std::slice::Vector, so re-export std::slice just for it.
283+
#[cfg(test)] pub use slice;
281284
}

branches/try2/src/test/run-make/unicode-input/multiple_files.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ fn random_char() -> char {
3636

3737
fn main() {
3838
let args = os::args();
39-
let rustc = args[1].as_slice();
40-
let tmpdir = Path::new(args[2].as_slice());
39+
let rustc = args.get(1).as_slice();
40+
let tmpdir = Path::new(args.get(2).as_slice());
4141

4242
let main_file = tmpdir.join("unicode_input_multiple_files_main.rs");
4343
let main_file_str = main_file.as_str().unwrap();

branches/try2/src/test/run-make/unicode-input/span_length.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ fn random_char() -> char {
3535

3636
fn main() {
3737
let args = os::args();
38-
let rustc = args[1].as_slice();
39-
let tmpdir = Path::new(args[2].as_slice());
38+
let rustc = args.get(1).as_slice();
39+
let tmpdir = Path::new(args.get(2).as_slice());
4040

4141
let main_file = tmpdir.join("span_main.rs");
4242
let main_file_str = main_file.as_str().unwrap();

branches/try2/src/test/run-pass/backtrace.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ fn runtest(me: &str) {
100100

101101
fn main() {
102102
let args = os::args();
103+
let args = args.as_slice();
103104
if args.len() >= 2 && args[1].as_slice() == "fail" {
104105
foo();
105106
} else if args.len() >= 2 && args[1].as_slice() == "double-fail" {

branches/try2/src/test/run-pass/cleanup-shortcircuit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ use std::os;
2424

2525
pub fn main() {
2626
let args = os::args();
27+
let args = args.as_slice();
2728

2829
// Here, the rvalue `"signal".to_owned()` requires cleanup. Older versions
2930
// of the code had a problem that the cleanup scope for this

branches/try2/src/test/run-pass/issue-10626.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use std::io::process;
1717

1818
pub fn main () {
1919
let args = os::args();
20+
let args = args.as_slice();
2021
if args.len() > 1 && args[1] == "child".to_owned() {
2122
for _ in range(0, 1000) {
2223
println!("hello?");

branches/try2/src/test/run-pass/issue-13304.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ fn start(argc: int, argv: **u8) -> int {
2525

2626
fn main() {
2727
let args = os::args();
28+
let args = args.as_slice();
2829
if args.len() > 1 && args[1].as_slice() == "child" {
2930
if args[2].as_slice() == "green" {
3031
child();
@@ -48,6 +49,7 @@ fn main() {
4849

4950
fn parent(flavor: ~str) {
5051
let args = os::args();
52+
let args = args.as_slice();
5153
let mut p = io::Process::new(args[0].as_slice(), ["child".to_owned(), flavor]).unwrap();
5254
p.stdin.get_mut_ref().write_str("test1\ntest2\ntest3").unwrap();
5355
let out = p.wait_with_output();

branches/try2/src/test/run-pass/issue-4541.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
fn parse_args() -> ~str {
1212
let args = ::std::os::args();
13+
let args = args.as_slice();
1314
let mut n = 0;
1415

1516
while n < args.len() {

branches/try2/src/test/run-pass/logging-separate-lines.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use std::str;
2222

2323
fn main() {
2424
let args = os::args();
25+
let args = args.as_slice();
2526
if args.len() > 1 && args[1].as_slice() == "child" {
2627
debug!("foo");
2728
debug!("bar");

branches/try2/src/test/run-pass/out-of-stack.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ fn loud_recurse() {
3434

3535
fn main() {
3636
let args = os::args();
37+
let args = args.as_slice();
3738
if args.len() > 1 && args[1].as_slice() == "silent" {
3839
silent_recurse();
3940
} else if args.len() > 1 && args[1].as_slice() == "loud" {

branches/try2/src/test/run-pass/send_str_treemap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub fn main() {
6262

6363
assert!(map.pop(&Slice("foo")).is_some());
6464
assert_eq!(map.move_iter().map(|(k, v)| k.to_str() + v.to_str())
65-
.collect::<~[~str]>()
65+
.collect::<Vec<~str>>()
6666
.concat(),
6767
"abc50bcd51cde52def53".to_owned());
6868
}

branches/try2/src/test/run-pass/signal-exit-status.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ use std::io::process::{Process, ExitSignal, ExitStatus};
2525

2626
pub fn main() {
2727
let args = os::args();
28+
let args = args.as_slice();
2829
if args.len() >= 2 && args[1] == "signal".to_owned() {
2930
// Raise a segfault.
3031
unsafe { *(0 as *mut int) = 0; }

branches/try2/src/test/run-pass/sigpipe-should-be-ignored.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ fn test() {
2525

2626
fn main() {
2727
let args = os::args();
28+
let args = args.as_slice();
2829
if args.len() > 1 && args[1].as_slice() == "test" {
2930
return test();
3031
}

branches/try2/src/test/run-pass/trait-to-str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl to_str for int {
2020

2121
impl<T:to_str> to_str for Vec<T> {
2222
fn to_string(&self) -> ~str {
23-
format!("[{}]", self.iter().map(|e| e.to_string()).collect::<~[~str]>().connect(", "))
23+
format!("[{}]", self.iter().map(|e| e.to_string()).collect::<Vec<~str>>().connect(", "))
2424
}
2525
}
2626

0 commit comments

Comments
 (0)