[rust-dev] Main page example compilation error (Patrick Walton)

Grahame Bowland grahame at angrygoats.net
Mon Apr 9 05:48:32 PDT 2012


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 <a.stavonin at gmail.com> 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
> Rust-dev at mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20120409/e77c43dd/attachment.html>


More information about the Rust-dev mailing list