starpls icon indicating copy to clipboard operation
starpls copied to clipboard

Fix new nightly type mismatch

Open keith opened this issue 9 months ago • 2 comments

error[E0308]: mismatched types
   --> crates/starpls/src/event_loop.rs:348:45
    |
348 |         if self.req_queue.incoming.complete(resp.id.clone()).is_some() {
    |                                    -------- ^^^^^^^^^^^^^^^ expected `&RequestId`, found `RequestId`
    |                                    |
    |                                    arguments to this method are incorrect
    |
note: method defined here
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lsp-server-0.7.8/src/req_queue.rs:47:12
    |
47  |     pub fn complete(&mut self, id: &RequestId) -> Option<I> {
    |            ^^^^^^^^
help: consider borrowing here
    |
348 |         if self.req_queue.incoming.complete(&resp.id.clone()).is_some() {
    |                                             +

keith avatar Mar 28 '25 03:03 keith

threading the needle a bit here, if we update past https://github.com/withered-magic/starpls/pull/382/ we need this, otherwise we don't

keith avatar Mar 28 '25 04:03 keith

Closed now that we're back on stable Rust: https://github.com/withered-magic/starpls/pull/390

withered-magic avatar Jun 10 '25 08:06 withered-magic