Hi Alexander

Tip moves pretty quickly; old style for has just been removed, I think you
want
  for vec::each([1,2,3]) { |i|
now.

Cheers
Grahame

On 9 April 2012 20:03, Alexander Stavonin <[email protected]> wrote:

> Patrick,
>
> I checked the example with latest version of Rust, compiled from Git.
> Results:
>
> astavonin:/Users/../RustTests: rustc --version
> rustc 0.2 (9e1e42d 2012-04-08 14:16:55 -0700)
> host: x86_64-apple-darwin
> astavonin:/Users/../RustTests: rustc test.rs
> test.rs:2:4: 2:7 error: `for` must be followed by a block call
> test.rs:2     for i in [1, 2, 3] {
>              ^~~
>
> What I've made wrong?
>
> Regards,
> Alexander.
>
> > The example is for the current git tip of Rust, not any released
> > version. Perhaps there should be a disclaimer to that effect...
> >
> > Patrick
> _______________________________________________
> 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