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

Autocomplete/hover broken for struct #14940

Closed
pickx opened this issue Jun 1, 2023 · 5 comments
Closed

Autocomplete/hover broken for struct #14940

pickx opened this issue Jun 1, 2023 · 5 comments
Labels
A-ty type system / type inference / traits / method resolution C-bug Category: bug

Comments

@pickx
Copy link

pickx commented Jun 1, 2023

in Cargo.toml:

[dependencies]
tower-lsp = "0.19.0"

in main.rs:

fn main() {
    tower_lsp::Server::$0
}

...no suggestions are given for struct Server. if a proper function call is used, for example

//...
tower_lsp::Server::new(a, b, c);

then even after the code successfully compiles, hover is broken for new().

EDIT: when specifying the types, suggestions still don't work, but hover/jump to definition do work after typing the function name.
for example,

[dependencies]
tower-lsp = "0.19.0"
tokio = { version = "1.28.2", features = ["io-util", "net"] }
tower_lsp::Server::<tokio::io::ReadHalf<tokio::net::TcpStream>, tokio::io::WriteHalf<tokio::net::TcpStream>, tower_lsp::ClientSocket>::$0

rust-analyzer version: 0.3.1533-standalone (505fd09 2023-05-28)

rustc version: 1.69.0

@pickx pickx added the C-bug Category: bug label Jun 1, 2023
@Veykril Veykril added the A-ty type system / type inference / traits / method resolution label Jun 1, 2023
@lowr
Copy link
Contributor

lowr commented Jun 9, 2023

We're running into the same chalk bug as #14369. This should be fixed by rust-lang/chalk#792.

@lnicola
Copy link
Member

lnicola commented Jun 12, 2023

@lowr
Copy link
Contributor

lowr commented Jun 14, 2023

I was particularly not really comfortable with pinging people (yes, I'm aware of that convo on zulip), but meanwhile that PR got merged finally! Now things are blocked on syn 2 upgrade I guess?

@Throne3d
Copy link
Contributor

It looks like the chalk MR was merged here, and I can't reproduce this issue locally - is this still an issue on recent versions of RA?

image

@pickx
Copy link
Author

pickx commented Jul 28, 2024

@Throne3d

It looks like the chalk MR was merged here, and I can't reproduce this issue locally - is this still an issue on recent versions of RA?

thanks for the ping!
I re-tested this and you're right. the first release where I could get Server::new to appear in the suggestions (and which also simultaneously fixed the hover issue), is 2023-07-03. the changelist mentions #15185 which I guess could be what fixed this?

anyway, closing as already fixed.

@pickx pickx closed this as completed Jul 28, 2024
@pickx pickx closed this as not planned Won't fix, can't repro, duplicate, stale Jul 28, 2024
@pickx pickx closed this as completed Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ty type system / type inference / traits / method resolution C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

5 participants