This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn recv() -> T { | |
| match move self.try_recv() { | |
| some(x) { move x } | |
| none { fail ~"port_set: endpoints closed" } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Manually expanded: | |
| rust: ~"(resolving item in lexical scope) resolving `next` in namespace 2 in `<opaque>`" | |
| rust: ~"(resolving name in module) resolving `next` in `???`" | |
| rust: ~"(resolving name in module) failed to resolve next" | |
| rust: ~"(resolving item in lexical scope) unresolved module" | |
| rust: ~"(resolving pattern) binding `next`" | |
| rust: ~"(recording def) recording def_binding(92, 1) for 92" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select! { | |
| foo => { | |
| do_foo -> _next { | |
| } | |
| } | |
| bar => { | |
| do_bar(x) -> _next { | |
| debug!(x) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Protocols | |
| proto! foo { | |
| foo:recv { | |
| do_foo -> foo | |
| } | |
| } | |
| proto! bar { | |
| bar:recv { | |
| do_bar(int) -> barbar, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [host-7-102:build eholk]$ ./x86_64-apple-darwin/stage1/bin/rustc -o test ../src/test/run-pass/pipe-select-macro.rs | |
| ~(~[(match_seq(~[(match_nonterminal(@~"lhs", @~"matchers", 0), (0, 0, none)), (match_tok(FAT_ARROW), (0, 0, none)), (match_nonterminal(@~"rhs", @~"tt", 1), (0, 0, none))], some(SEMI), 0, 0, 2), (0, 0, none)), (match_seq(~[(match_tok(SEMI), (0, 0, none))], none, 1, 2, 2), (0, 0, none))], none, 0, matcher_pos_up(none), ~[dvec_((~[])), dvec_((~[]))], 0, 2, 327) | |
| ~(~[(match_nonterminal(@~"lhs", @~"matchers", 0), (0, 0, none)), (match_tok(FAT_ARROW), (0, 0, none)), (match_nonterminal(@~"rhs", @~"tt", 1), (0, 0, none))], some(SEMI), 0, matcher_pos_up(some(~(~[(match_seq(~[(match_nonterminal(@~"lhs", @~"matchers", 0), (0, 0, none)), (match_tok(FAT_ARROW), (0, 0, none)), (match_nonterminal(@~"rhs", @~"tt", 1), (0, 0, none))], some(SEMI), 0, 0, 2), (0, 0, none)), (match_seq(~[(match_tok(SEMI), (0, 0, none))], none, 1, 2, 2), (0, 0, none))], none, 0, matcher_pos_up(none), ~[dvec_((~[])), dvec_((~[]))], 0, 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn draw_frame(+channel: double_buffer::client::acquire) { | |
| let channel = request(channel); | |
| select! { | |
| channel => { | |
| give_buffer(buffer) -> channel { | |
| render(&buffer); | |
| release(channel, move buffer) | |
| } | |
| } | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| macro_rules! select_if { | |
| { | |
| $index:expr, | |
| $count:expr, | |
| $port:path => [ | |
| $($message:path$(($($x: ident),+))dont_type_this* | |
| -> $next:ident $e:expr),+ | |
| ], | |
| $( $ports:path => [ | |
| $($messages:path$(($($xs: ident),+))dont_type_this* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| macro_rules! html { | |
| { $($body:tt)* } => { | |
| let builder = HTMLBuilder(); | |
| build_html!{builder := $($body)*}; | |
| builder.getDoc() | |
| } | |
| } | |
| macro_rules! build_html { | |
| { $builder:expr := </$tag:ident> $($rest:tt)* } => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| macro_rules! html { | |
| { $($body:tt)* } => ( | |
| parse_node!( []; []; $($body)* ) | |
| ) | |
| } | |
| macro_rules! parse_node { | |
| { | |
| [:$head:ident ($(:$head_nodes:expr),*) | |
| $(:$tags:ident ($(:$tag_nodes:expr),*))*]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ((lambda (_.0) | |
| (list | |
| (_.0 (list)) | |
| (list 'lambda '(_.1) (list 'quote (_.0 (list)))))) | |
| (lambda (_.1) | |
| '(lambda (_.0) | |
| (list | |
| (_.0 (list)) | |
| (list 'lambda '(_.1) (list 'quote (_.0 (list)))))))) |