Hi everyone,

Here with a novice question. I'm trying to use the select! macro in:

http://static.rust-lang.org/doc/0.9/std/comm/select/index.html


And can't figure out how to get it to import. My current code looks like
this:

use std::comm::select;

fn main() {
  let (p,c): (Port<int>, Chan<int>) = Chan::new();
  spawn(proc() {
    c.send(42);
  });

  select! (
    val = p.recv() => {
      print(val);
    }
  );
}


However, `rustc testselect.rs` says "error: macro undefined: 'select'".
I've also tried "use std::comm::*" with feature(globs). Thanks for the help!

Frank
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to