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

Compile error E0308: mismatched types #577

Open
varac opened this issue Nov 4, 2024 · 2 comments
Open

Compile error E0308: mismatched types #577

varac opened this issue Nov 4, 2024 · 2 comments

Comments

@varac
Copy link

varac commented Nov 4, 2024

I am using the language server since a while, and I always could install it.
Today it was failing with E0308: mismatched types, maybe it's due to an updated rust/cargo version ?

$ cargo install --root . --version 1.3.5 beancount-language-server 
   ...
   Compiling beancount-language-server v1.3.5
error[E0308]: mismatched types
   --> /home/varac/.cargo/registry/src/index.crates.io-6f17d22bba15001f/beancount-language-server-1.3.5/src/server.rs:288:74
    |
288 | ...q_queue.incoming.complete(response.id.clone()) {
    |                     -------- ^^^^^^^^^^^^^^^^^^^ expected `&RequestId`, found `RequestId`
    |                     |
    |                     arguments to this method are incorrect
    |
note: method defined here
   --> /home/varac/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lsp-server-0.7.7/src/req_queue.rs:49:12
    |
49  |     pub fn complete(&mut self, id: &RequestId) -> Option<I> {
    |            ^^^^^^^^
help: consider borrowing here
    |
288 |         if let Some((_method, start)) = self.req_queue.incoming.complete(&response.id.clone()) {
    |                                                                          +

For more information about this error, try `rustc --explain E0308`.
error: could not compile `beancount-language-server` (lib) due to 1 previous error
error: failed to compile `beancount-language-server v1.3.5`, intermediate artifacts can be found at `/tmp/cargo-installyxIgZc`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Versions


$ rustc --version
rustc 1.81.0 (eeb90cda1 2024-09-04) (Arch Linux rust 1:1.81.0-1)

/tmp $ cargo --version
cargo 1.81.0 (2dbb1af80 2024-08-20)
@ERElli
Copy link

ERElli commented Nov 13, 2024

It looks like this issue has been resolved in v1.3.6. See this closed issue

@dustinfarris
Copy link

How do you install v1.3.6?

cargo install --version 1.3.6 beancount-language-server
    Updating crates.io index
error: could not find `beancount-language-server` in registry `crates-io` with version `=1.3.6`

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

3 participants