You can use the prototype through `std::comm::Select` for now, but the
macro is not currently exported. See
https://github.com/mozilla/rust/issues/12044 for more information.

On Mon, Feb 24, 2014 at 10:59 PM, Frank Huang <[email protected]> wrote:
> 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
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to