-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// xfail-pretty | ||
// xfail-win32 | ||
// xfail-test | ||
|
||
// Generated from pipe compiler | ||
mod stream { | ||
fn init<T: send>() -> (client::stream<T>, server::stream<T>) { | ||
pipes::entangle() | ||
} | ||
enum stream<T: send> { send(T, server::stream<T>), } | ||
mod client { | ||
fn send<T: send>(+pipe: stream<T>, +x_0: T) -> stream<T> { | ||
{ | ||
let (c, s) = pipes::entangle(); | ||
let message = stream::send(x_0, s); | ||
pipes::send(pipe, message); | ||
c | ||
} | ||
} | ||
type stream<T: send> = pipes::send_packet<stream::stream<T>>; | ||
} | ||
mod server { | ||
type stream<T: send> = pipes::recv_packet<stream::stream<T>>; | ||
} | ||
} | ||
|
||
fn main() { | ||
let (bc, _bp) = stream::init(); | ||
|
||
stream::client::send(bc, "abc"); | ||
} |