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

Recursive calls of a local function are not resolved #4438

Closed
sanbox-irl opened this issue May 12, 2020 · 7 comments · Fixed by #8076
Closed

Recursive calls of a local function are not resolved #4438

sanbox-irl opened this issue May 12, 2020 · 7 comments · Fixed by #8076
Labels
S-actionable Someone could pick this issue up and work on it right now

Comments

@sanbox-irl
Copy link

Hello!

The following is working as intended:

image

But when we try to call the function inside itself:
image

We do not get the appropriate autocomplete option.

Not uber essential, but just wanted to put the issue up so it's known

@bnjjj
Copy link
Contributor

bnjjj commented May 13, 2020

Maybe I'm wrong but as far as I know for now in rust-analyzer declaring function or trait or impl inside a function body is not already supported.

@lnicola
Copy link
Member

lnicola commented May 13, 2020

I thought so, but apparently it's better supported now than it used to be. Notice that the function is resolved properly in the first screenshot.

@sanbox-irl
Copy link
Author

Yes -- Rust analyzer now supports local functions in some manner! I actually think it used to support this thing, but not positive....

@lnicola lnicola added the S-unactionable Issue requires feedback, design decisions or is blocked on other work label Jan 22, 2021
@lnicola
Copy link
Member

lnicola commented Jan 22, 2021

Blocked on #1559.

@pksunkara
Copy link
Contributor

@lnicola This should be actionable now.

@lnicola lnicola added S-actionable Someone could pick this issue up and work on it right now and removed S-unactionable Issue requires feedback, design decisions or is blocked on other work labels Feb 22, 2021
@lnicola lnicola changed the title Recursive local function auto-complete not working Recursive calls of a local function are not resolved Feb 22, 2021
@jonas-schievink
Copy link
Contributor

This is fixed, I've added a test in #8076

@bors bors bot closed this as completed in 62c059e Mar 17, 2021
@sanbox-irl
Copy link
Author

thank you all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants