Skip to content

wrong go to function #11759

@mimoo

Description

@mimoo

rust-analyzer version: 5fae65d 2022-03-07 stable

rustc version: rustc 1.58.0 (02072b482 2022-01-11)

relevant settings: none

Overview

First, some easy to follow screenshots to convince you: this eval is a closure:

Screen Shot 2022-03-18 at 11 46 33 AM

But the function we're passing it to is not expecting a closure:

Screen Shot 2022-03-18 at 11 47 05 AM

that's the function it should have pointed me to. Interestingly sourcegraph has the same issues, so I guess they must be using rust-analyzer under the hood.

Screen Shot 2022-03-18 at 11 49 19 AM

I reckon this bug comes from the fact that we abuse a bit generic parameters:

pub type JointLookupSpec<F> = JointLookup<SingleLookup<F>>;

Repro steps

Sorry in advance, I haven't been able to do a smaller repro steps:

  1. clone this repo
  2. git checkout fa87bd7cdb5adf7df43c187a2828d2e588088fb2
  3. check kimchi/src/circuits/polynomials/lookup.rs:656

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-tytype system / type inference / traits / method resolutionC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions