rust-lang / rust-lang/rust-analyzer

r-a fails to resolve associated function with complicated where bound

Open
#13,129 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

rust-analyzer version: 0.4.1183-standalone (6bea872ed 2022-08-26)

rustc version: rustc 1.65.0-nightly (878aef79d 2022-08-20)

relevant settings: N/A

Code in question:

https://github.com/al2me6/evanescence/blob/af405f397ccd857377d315da6e33cc80894aec32/evanescence_core/src/numerics/optimization/simple_x.rs#L311

Expected outcome: hovering over Simple::new shows its definition at

https://github.com/al2me6/evanescence/blob/af405f397ccd857377d315da6e33cc80894aec32/evanescence_core/src/numerics/optimization/simple_x.rs#L168-L179

Observed outcome:

image

Naively, I would suspect this has to do with const generics?

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 hover behavior in evanescence_core/src/numerics/optimization/simple_x.rs, comparing the call at line 311 with the definition at lines 168-179. Start by investigating associated-function resolution for the complicated where bound and possible const-generic involvement; done means hovering over Simple::new resolves to its definition.

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
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.