rust-lang / rust-lang/rust-analyzer

GATs in QualifiedPathType completion failed.

Open
#17,218 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-completion C-bug
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

rust-analyzer version: rust-analyzer 1.77.0-nightly (bf8716f1 2023-12-24)

rustc version: rustc 1.77.0-nightly (bf8716f1c 2023-12-24)

editor or extension: Vim9.1 coc.nvim coc-rust-analyzer

code snippet to reproduce:

trait SelfType { type SelfType: ?Sized; }
impl<T: ?Sized> SelfType for T { type SelfType = Self; }

fn main() {
    let _ = <i32 as SelfType>::SelfType::pow(2, 3); // input SelfType::, open completion list, is empty
}

in pow(...) use Hover Doc, is normal

UPDATE:

On rust-analyzer 0.4.2885-standalone, Output notable trait methods, but no i32::pow

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the empty completion list at SelfType:: in the Rust snippet using the reported rust-analyzer and rustc versions. Start from the qualified-path completion entry point and compare the completion results with the working hover documentation; done means i32::pow appears in the completion list.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.