Skip to content

Building LanguangeClient-neovim fails

Currently the next branch of the language client uses logic/features not yet present in the Debian buster release of the rust compiler. The following errors are outputted

   Compiling notify v4.0.12
warning: unused import: `std::ops::Deref`
  --> src/main.rs:10:5
   |
10 | use std::ops::Deref;
   |     ^^^^^^^^^^^^^^^
   |
   = note: #[warn(unused_imports)] on by default

error[E0599]: no method named `as_deref` found for type `std::option::Option<std::string::String>` in the current scope
  --> src/rpchandler.rs:10:62
   |
10 |                 let result = self.handle_method_call(lang_id.as_deref(), &method_call);
   |                                                              ^^^^^^^^ help: did you mean: `as_ref`

error[E0599]: no method named `as_deref` found for type `std::option::Option<std::string::String>` in the current scope
  --> src/rpchandler.rs:25:63
   |
25 |                 let result = self.handle_notification(lang_id.as_deref(), &notification);
   |                                                               ^^^^^^^^ help: did you mean: `as_ref`

error[E0599]: no method named `as_deref` found for type `&std::option::Option<std::string::String>` in the current scope
   --> src/vim.rs:151:29
    |
151 |         let goto = goto_cmd.as_deref().unwrap_or("edit");
    |                             ^^^^^^^^ help: did you mean: `as_ref`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0599`.
error: Could not compile `languageclient`.

To learn more, run the command again with --verbose.
make: *** [Makefile:24: release] Error 101

Find the exact commit in which the build won't fail when compiling with current version of rust 1.34.2.