Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo build error: struct field shorthands are unstable (see issue #37340) #2

Closed
nemobis opened this issue Jul 7, 2017 · 3 comments

Comments

@nemobis
Copy link

nemobis commented Jul 7, 2017

With fastar f74dd0428c742e1aa454e3b954c5b84db8606fc7 , cargo 0.17.0-0ubuntu1, rustc 1.16.0+dfsg1-1~exp1ubuntu1 , Ubuntu 16.04 with Linux 4.10.0-22-generic.

error: struct field shorthands are unstable (see issue #37340)
  --> /home/fondazione/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/reapfrog-0.2.0/src/lib.rs:38:18
   |
38 |         Prefetch{f, read_pos: 0, length: len, p, to_drop: 0, prefetch_pos: 0}
   |                  ^

error: struct field shorthands are unstable (see issue #37340)
  --> /home/fondazione/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/reapfrog-0.2.0/src/lib.rs:38:47
   |
38 |         Prefetch{f, read_pos: 0, length: len, p, to_drop: 0, prefetch_pos: 0}
   |                                               ^

error: aborting due to 2 previous errors

error: Could not compile `reapfrog`.
Build failed, waiting for other jobs to finish...
error: build failed
@nemobis
Copy link
Author

nemobis commented Jul 7, 2017

From rust-lang/rfcs#1682 and rust-lang/rust#37340 I can't quite tell what one is supposed to do, but if I change that line to have f: f and p: p this error goes away.

@the8472
Copy link
Owner

the8472 commented Jul 7, 2017

rustc 1.16.0

Field shorthand initializers have been in stable release since 1.17. Current stable is 1.18.

@the8472 the8472 closed this as completed Jul 7, 2017
@the8472
Copy link
Owner

the8472 commented Jul 7, 2017

You can either install current cargo/rust versions via rustup or download a fastar binary for x64 linux from the github releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants