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

Installation error with latest rustc-demangle #350

Closed
ankane opened this issue Sep 14, 2021 · 2 comments
Closed

Installation error with latest rustc-demangle #350

ankane opened this issue Sep 14, 2021 · 2 comments

Comments

@ankane
Copy link

ankane commented Sep 14, 2021

Hi, thanks for this project! I wanted to report an error during installation with rustc-demangle.

cargo +nightly-2019-12-05 install c2rust

Error

error[E0658]: use of unstable library feature 'matches_macro'
   --> /Users/andrew/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-demangle-0.1.21/src/v0.rs:700:20
    |
700 |                 if matches!((quote, c), ('\'', '"') | ('"', '\'')) {
    |                    ^^^^^^^
    |
    = note: for more information, see https:/rust-lang/rust/issues/65721
    = help: add `#![feature(matches_macro)]` to the crate attributes to enable

It appears to be due to this change in rustc-demangle 0.1.21, which uses the matches! macro, which isn't stable in nightly-2019-12-05.

@thedataking
Copy link
Contributor

Have you tried cargo +nightly-2019-12-05 install c2rust --locked? If so, this is likely a duplicate of #323.

@ankane
Copy link
Author

ankane commented Sep 14, 2021

Thanks @thedataking, looks like that fixed it. A few suggestions to make it easier for new users:

  1. Would be good to merge Add --locked Flag to Cargo Install Instructions #335 to add --locked to the readme instructions
  2. --locked doesn't seem to work with the "Installing from Git" instructions (possibly cargo install --locked doesn't honour the lockfile for a git source rust-lang/cargo#7495). I think this can be updated to:
git clone https:/immunant/c2rust.git
cd c2rust
cargo +nightly-2019-12-05 install --path c2rust --locked
  1. On Mac, brew install llvm installs LLVM 12, which isn't doesn't appear to be supported by the latest release. Would be good to either make a new release with dfa995c or update the Mac instructions to brew install llvm@9 and LLVM_CONFIG_PATH=/usr/local/opt/llvm@9/bin/llvm-config.

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