Skip to content

Commit 206cde3

Browse files
committed
---
yaml --- r: 66366 b: refs/heads/master c: 76b910d h: refs/heads/master v: v3
1 parent 3c18528 commit 206cde3

File tree

8 files changed

+153
-8
lines changed

8 files changed

+153
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 3dfbc5a9c49d65295bf96ce435a29df72e03c09e
2+
refs/heads/master: 76b910d8cca5535774cc94637dc6b7e1fda6de1c
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/src/librustpkg/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ fn command_line_test(args: &[~str], cwd: &Path) -> ProcessOutput {
144144
err_fd: None
145145
});
146146
let output = prog.finish_with_output();
147-
debug!("Output from command %s with args %? was %s {%s}[%?]",
147+
io::println(fmt!("Output from command %s with args %? was %s {%s}[%?]",
148148
cmd, args, str::from_bytes(output.output),
149149
str::from_bytes(output.error),
150-
output.status);
150+
output.status));
151151
/*
152152
By the way, rustpkg *won't* return a nonzero exit code if it fails --
153153
see #4547

trunk/src/librustpkg/util.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ pub fn compile_input(ctxt: &Ctx,
187187
Lib => lib_crate,
188188
Test | Bench | Main => bin_crate
189189
};
190-
let matches = getopts(debug_flags()
190+
let matches = getopts(~[~"-Z", ~"time-passes"]
191191
+ match what {
192192
Lib => ~[~"--lib"],
193193
// --test compiles both #[test] and #[bench] fns
@@ -415,7 +415,3 @@ mod test {
415415
}
416416

417417
}
418-
419-
// tjc: cheesy
420-
fn debug_flags() -> ~[~str] { ~[] }
421-
// static debug_flags: ~[~str] = ~[~"-Z", ~"time-passes"];
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
12+
use std::io;
13+
14+
macro_rules! print_hd_tl (
15+
($field_hd:ident, $($field_tl:ident),+) => ({
16+
io::print(stringify!($field)); //~ ERROR unknown macro variable
17+
io::print("::[");
18+
$(
19+
io::print(stringify!($field_tl));
20+
io::print(", ");
21+
)+
22+
io::print("]\n");
23+
})
24+
)
25+
26+
fn main() {
27+
print_hd_tl!(x, y, z, w)
28+
}
29+

trunk/src/test/run-pass/issue-4446.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use std::{pipes, io, task, comm};
12+
13+
fn main() {
14+
let (port, chan) = comm::stream();
15+
16+
do task::spawn {
17+
io::println(port.recv());
18+
}
19+
20+
chan.send("hello, world");
21+
}

trunk/src/test/run-pass/issue-5060.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use std::io;
12+
13+
macro_rules! print_hd_tl (
14+
($field_hd:ident, $($field_tl:ident),+) => ({
15+
io::print(stringify!($field_hd));
16+
io::print("::[");
17+
$(
18+
io::print(stringify!($field_tl));
19+
io::print(", ");
20+
)+
21+
io::print("]\n");
22+
})
23+
)
24+
25+
fn main() {
26+
print_hd_tl!(x, y, z, w)
27+
}
28+

trunk/src/test/run-pass/issue-5192.rs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
pub trait EventLoop {
12+
}
13+
14+
pub struct UvEventLoop {
15+
uvio: int
16+
}
17+
18+
impl UvEventLoop {
19+
pub fn new() -> UvEventLoop {
20+
UvEventLoop {
21+
uvio: 0
22+
}
23+
}
24+
}
25+
26+
impl EventLoop for UvEventLoop {
27+
}
28+
29+
pub struct Scheduler {
30+
event_loop: ~EventLoop,
31+
}
32+
33+
impl Scheduler {
34+
35+
pub fn new(event_loop: ~EventLoop) -> Scheduler {
36+
Scheduler {
37+
event_loop: event_loop,
38+
}
39+
}
40+
}
41+
42+
fn main() {
43+
let mut sched = Scheduler::new(~UvEventLoop::new() as ~EventLoop);
44+
}

trunk/src/test/run-pass/issue-5280.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// xfail-test
12+
13+
type FontTableTag = u32;
14+
15+
trait FontTableTagConversions {
16+
fn tag_to_str(self);
17+
}
18+
19+
impl FontTableTagConversions for FontTableTag {
20+
fn tag_to_str(self) {
21+
&self;
22+
}
23+
}
24+
25+
fn main() {
26+
5.tag_to_str();
27+
}

0 commit comments

Comments
 (0)