Skip to content

Instantly share code, notes, and snippets.

@steveklabnik
Created April 8, 2013 01:33
Show Gist options
  • Select an option

  • Save steveklabnik/5333533 to your computer and use it in GitHub Desktop.

Select an option

Save steveklabnik/5333533 to your computer and use it in GitHub Desktop.
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
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