Created
April 8, 2013 01:33
-
-
Save steveklabnik/5333533 to your computer and use it in GitHub Desktop.
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
| rustc rust.rs | |
| rust.rs:11:10: 11:24 error: the type of this value must be known in this context | |
| rust.rs:11 chan.send(10); | |
| ^~~~~~~~~~~~~~ | |
| error: aborting due to previous error | |
| make: *** [build] Error 101 |
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
| use core::task::spawn; | |
| use core::pipes::stream; | |
| use core::pipes::Port; | |
| use core::pipes::Chan; | |
| use core::io::println; | |
| fn main() { | |
| let (port, chan): (Port<int>, Chan<int>) = stream(); | |
| do spawn |chan| { | |
| chan.send(10); | |
| } | |
| println(int::to_str(port.recv())); | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment