Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Go to Definition on Foo in Foo::test() does not work #940

Closed
tuxmark5 opened this issue Jul 13, 2018 · 1 comment
Closed

Go to Definition on Foo in Foo::test() does not work #940

tuxmark5 opened this issue Jul 13, 2018 · 1 comment

Comments

@tuxmark5
Copy link

Clicking "Go to Definition" in vscode on Foo in marked line shows "No definition found for 'Foo'".
It works fine when doing "Go to Definition" on test part of Foo::test().

struct Foo { }

impl Foo {
  pub fn test() { }
}

fn main() {
  Foo::test(); // Go to Definition on Foo does not work
}

RLS version: rls-preview 0.129.0-nightly (6b4238b 2018-07-06)

@nrc
Copy link
Member

nrc commented Jul 20, 2018

In general, for paths like foo::bar::baz we only have information for baz not for foo and bar. This is a limitation in the compiler, but I hope to fix it at some point.

Tracked in rust-dev-tools/rls-analysis#109

@nrc nrc closed this as completed Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants