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

Cannot compile with latest Rust due to struct shorthand error #197

Closed
evanworley opened this issue Aug 3, 2017 · 19 comments
Closed

Cannot compile with latest Rust due to struct shorthand error #197

evanworley opened this issue Aug 3, 2017 · 19 comments
Assignees
Labels
errors › build error exa fails to build

Comments

@evanworley
Copy link

error: struct field shorthands are unstable (see issue #37340)
  --> /exa-d551ef44a896dca9/f54bc41/src/fs/dir.rs:45:18
   |
45 |         Ok(Dir { contents, path, git })
   |                  ^^^^^^^^

@1xch
Copy link

1xch commented Aug 3, 2017

eh came here to report the same from trying to build this


error: struct field shorthands are unstable (see issue #37340)
--> $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-bidi-0.3.4/src/explicit.rs:180:32

|

@ogham ogham self-assigned this Aug 4, 2017
@ogham ogham added the errors › build error exa fails to build label Aug 4, 2017
@ogham
Copy link
Owner

ogham commented Aug 4, 2017

I'm able to compile with rustc 1.19.0. What version of the compiler are you using?

@jpbetz
Copy link

jpbetz commented Aug 4, 2017

I encountered the same issue with rust 1.15.1

@tspiteri
Copy link

tspiteri commented Aug 4, 2017

Struct field shorthands (RFC 1682) were stabilized in rustc 1.17.0.

https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1170-2017-04-27

@evanworley
Copy link
Author

evanworley commented Aug 4, 2017

Odd, I just installed Rust yesterday using curl https://sh.rustup.rs -sSf | sh, would have thought that would put me on 1.19.X

Figured this out, I had an older, native version of rust in my ubuntu install. Just need to fix up my path and I'm good to go.

@ogham
Copy link
Owner

ogham commented Aug 5, 2017

Rust releases frequently, and struct field shorthand was too good to pass up!

@jpbetz
Copy link

jpbetz commented Aug 5, 2017

Maybe add a minimum required rust version to the docs so engineers not working regularly with rust don't have to try to sort out which version they need?

ogham added a commit that referenced this issue Aug 5, 2017
Now I just need to remember to update it. Was suggested in #197.
@ogham
Copy link
Owner

ogham commented Aug 5, 2017

I added something to the README.

@changemenemo
Copy link

still having a problem. last version of rust and still can't build unicode-bidi

@changemenemo
Copy link

 Running `rustc --crate-name unicode_bidi /home/vigilian/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-bidi-0.3.4/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort --cfg 'feature="default"' -C metadata=923723ecf34481e5 -C extra-filename=-923723ecf34481e5 --out-dir /tmp/cargo-install.8jepUtbYwhwB/release/deps -L dependency=/tmp/cargo-install.8jepUtbYwhwB/release/deps --extern matches=/tmp/cargo-install.8jepUtbYwhwB/release/deps/libmatches-0e8697cdbffa9233.rlib --cap-lints allow`
error: struct field shorthands are unstable (see issue #37340)
   --> /home/vigilian/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-bidi-0.3.4/src/explicit.rs:180:32
    |
180 |         self.vec.push(Status { level, status });
    |                                ^^^^^

error: struct field shorthands are unstable (see issue #37340)
   --> /home/vigilian/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-bidi-0.3.4/src/explicit.rs:180:39
    |
180 |         self.vec.push(Status { level, status });
    |                                       ^^^^^^

error: struct field shorthands are unstable (see issue #37340)
   --> /home/vigilian/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-bidi-0.3.4/src/lib.rs:226:13
    |
226 |             text,
    |             ^^^^

error: struct field shorthands are unstable (see issue #37340)
   --> /home/vigilian/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-bidi-0.3.4/src/lib.rs:227:13
    |
227 |             original_classes,
    |             ^^^^^^^^^^^^^^^^

error: struct field shorthands are unstable (see issue #37340)
   --> /home/vigilian/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-bidi-0.3.4/src/lib.rs:228:13
    |
228 |             paragraphs,
    |             ^^^^^^^^^^

error: struct field shorthands are unstable (see issue #37340)
   --> /home/vigilian/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-bidi-0.3.4/src/lib.rs:303:13
    |
303 |             text,
    |             ^^^^

error: struct field shorthands are unstable (see issue #37340)
   --> /home/vigilian/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-bidi-0.3.4/src/lib.rs:304:13
    |
304 |             original_classes,
    |             ^^^^^^^^^^^^^^^^

error: struct field shorthands are unstable (see issue #37340)
   --> /home/vigilian/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-bidi-0.3.4/src/lib.rs:305:13
    |
305 |             paragraphs,
    |             ^^^^^^^^^^

error: struct field shorthands are unstable (see issue #37340)
   --> /home/vigilian/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-bidi-0.3.4/src/lib.rs:306:13
    |
306 |             levels,
    |             ^^^^^^

error: aborting due to 9 previous errors

error: Could not compile `unicode-bidi`.

Caused by:
  process didn't exit successfully: `rustc --crate-name unicode_bidi /home/vigilian/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-bidi-0.3.4/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort --cfg feature="default" -C metadata=923723ecf34481e5 -C extra-filename=-923723ecf34481e5 --out-dir /tmp/cargo-install.8jepUtbYwhwB/release/deps -L dependency=/tmp/cargo-install.8jepUtbYwhwB/release/deps --extern matches=/tmp/cargo-install.8jepUtbYwhwB/release/deps/libmatches-0e8697cdbffa9233.rlib --cap-lints allow` (exit code: 101)

@hoodie
Copy link
Contributor

hoodie commented Aug 21, 2017

@boistordu I sorta don't believe the "last rust version" part, sure you haven't overlooked something?

@changemenemo
Copy link

@hoodie I've used this for rust 'curl https://sh.rustup.rs -sSf | sh' so I don't know but I guess

@ogham
Copy link
Owner

ogham commented Aug 21, 2017

What happens when you run rustup show?

@changemenemo
Copy link

are you sure about this command? because it tells me command not found

@changemenemo
Copy link

@ rust I've only $ rust
rustc rustdoc rust-gdb

@changemenemo
Copy link

$ rustc --version
rustc 1.16.0

@kalashnikov
Copy link

I encounter similar issue when using rust 1.15.1
rustc 1.15.1 (021bd294c 2017-02-08)
rustup show result is x86_64-unknown-linux-gnu

I successfully build after executing rustup update.

On RHEL6.

@hoodie
Copy link
Contributor

hoodie commented Aug 31, 2017

@kalashnikov you need at least rust 1.17

@kalashnikov
Copy link

@hoodie Ah, that should be the reason in my condition. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
errors › build error exa fails to build
Projects
None yet
Development

No branches or pull requests

8 participants