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 fail on M1 Mac Rust #30

Closed
kjur opened this issue Feb 13, 2022 · 3 comments
Closed

cargo build fail on M1 Mac Rust #30

kjur opened this issue Feb 13, 2022 · 3 comments

Comments

@kjur
Copy link

kjur commented Feb 13, 2022

I got a error on cargo build:

% sudo cargo install jless
... snip ...
error[E0658]: or-patterns syntax is experimental
   --> /Users/user1/.cargo/registry/src/github.com-1ecc6299db9ec823/jless-0.7.1/src/app.rs:101:26
    |
101 |                 KeyEvent(Key::Ctrl('c') | Key::Char('q')) => break,
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information
error[E0658]: or-patterns syntax is experimental
  --> /Users/user1/.cargo/registry/src/github.com-1ecc6299db9ec823/jless-0.7.1/src/jsonparser.rs:67:24
   |
67 |         while let Some(JsonToken::Whitespace | JsonToken::Newline) = self.peek_token_or_eof() {
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0658`.
error: failed to compile `jless v0.7.1`, intermediate artifacts can be found at `/tmp/cargo-installoCXkLq`
Caused by:
  could not compile `jless`
To learn more, run the command again with --verbose.

How can I build this? Thank you for your help.

@smbl64
Copy link

smbl64 commented Feb 13, 2022

Which Rust version do you use? (rustc --version)?

From the error you have posted, it seems the or-patterns require at least Rust v1.53.
(rust-lang/rust#54883)

@kjur
Copy link
Author

kjur commented Feb 13, 2022

Thank you. My rustc version was "1.52.1". I'll update and try it.

@kjur kjur closed this as completed Feb 13, 2022
@kjur
Copy link
Author

kjur commented Feb 13, 2022

Works fine with rust 1.58.1. Thank you for the cool tool.

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