racer-rust / racer

Rust Code Completion utility
MIT License
3.36k stars 278 forks source link

error[E0658]: use of unstable library feature 'try_trait_v2' #1168

Closed JesseStutler closed 3 years ago

JesseStutler commented 3 years ago

I started to run the command cargo +nightly install racer, when it began to compile racer v2.1.46, there were many errors. The first few errors are all abouterror[E0658]: use of unstable library feature 'try_trait_v2'.More information is here:

   --> /Users/chenzicong/.cargo/registry/src/github.com-1ecc6299db9ec823/racer-2.1.46/src/racer/util.rs:834:15
    |
834 |         match ::std::ops::Try::into_result($res) {
    |               ^^^^^^^^^^^^^^^
    |
   ::: /Users/chenzicong/.cargo/registry/src/github.com-1ecc6299db9ec823/racer-2.1.46/src/racer/ast.rs:564:46
    |
564 | ...                   let ty = try_continue!(ty).dereference();
    |                                ----------------- in this macro invocation
    |
    = note: see issue #84277 <https://github.com/rust-lang/rust/issues/84277> for more information
    = help: add `#![feature(try_trait_v2)]` to the crate attributes to enable
    = note: this error originates in the macro `try_continue` (in Nightly builds, run with -Z macro-backtrace for more info)

My cargo version is cargo 1.52.0 (69767412a 2021-04-21) My rustc version is rustc 1.52.1 (9bc8c42bb 2021-05-09) uname -a information:Darwin chenzicongdeMacBook-Pro.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64

How to solve this problem?

Xanewok commented 3 years ago

Fixed with #1167.

JesseStutler commented 3 years ago

Fixed with #1167.

Uh...How to solve specifically..? New to Rust, I don't know what new features had been pulled request. Do I need to change some configuration?

calebcartwright commented 3 years ago

Fixed with #1167.

Uh...How to solve specifically..? New to Rust, I don't know what new features had been pulled request. Do I need to change some configuration?

You should be able to grab the latest version 2.1.47 now that the aforementioned fix has been merged and included in a new release. Alternatively you could get 2.1.46 if you went back to a slightly older nightly release