Skip to content

Commit d7a0c18

Browse files
committed
---
yaml --- r: 63870 b: refs/heads/snap-stage3 c: 0326b0a h: refs/heads/master v: v3
1 parent 0a64be4 commit d7a0c18

File tree

6 files changed

+150
-1
lines changed

6 files changed

+150
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 132cfcdd8898a12b19ba01ae64cd9cff9a4c45d9
4+
refs/heads/snap-stage3: 0326b0abed3fe9045bfc8e84d060115aecdcee37
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
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+
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+
}
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+
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+
}
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)