racer-rust / racer

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

Build error in racer v2.2.2 #1181

Closed killme2008 closed 2 years ago

killme2008 commented 2 years ago

I ran command cargo +nightly install racer on mac, but it failed with an error as below:

36 |     fn fallback_fluent_bundle(&self) -> &Lrc<rustc_errors::FluentBundle> {
   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |                                         |
   |                                         expected struct `fluent_bundle::bundle::FluentBundle`, found struct `Lrc`
   |                                         help: change the output type to match the trait: `&fluent_bundle::bundle::FluentBundle<fluent_bundle::resource::FluentResource, intl_memoizer::IntlLangMemoizer>`

Some information may be useful:

➜  ~ rustc --version
rustc 1.60.0 (7737e0b5c 2022-04-04)
calebcartwright commented 2 years ago

First want to note that racer is essentially end of life and users are encouraged to use alternatives like Rust Analyzer instead.

This is functionally a duplicate of similar issues, e.g. #1173, but if for some reason you still need to build racer then you need to use a supported nightly toolchain, not just any nightly toolchain.

The easiest way to identify a supported nightly toolchain is to look at the toolchain file in the repo: https://github.com/racer-rust/racer/blob/a457c235b545c5251570cda8fec1edeab05ab1d4/rust-toolchain.toml#L2

killme2008 commented 2 years ago

@calebcartwright thank you, i will try it.