-
Notifications
You must be signed in to change notification settings - Fork 1.8k
include! concat! env! OUT_DIR not auto completing #4482
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
Comments
Did you enable : |
Yup sure did ! I checked the check box in the VSCode rust-analyzer extension settings. Not sure if it matters, but I originally ran into this in my project’s cargo workspace but I verified that I get the same issues in a non workspace as well. |
Yeah, a minimal reproducible example will be nice to have to help here. ! |
Sure! Everything is captured in the attached screenshot. I expected the pictured auto-complete to include Here's a repository with the code above: https://github.com/chinedufn/rust-analyzer-issue-4482 |
Hm, could it be a problem with relative paths, since the path inside the |
@flodiebold thanks for the help! Sorry, I'm not quite getting what you're asking? |
I'm just speculating about the reason for the bug 😉 |
@edwin0cheng anything happen to ring a bell in terms of what might be happening? Cheers! |
No idea, and this week I am a bit busy, but I think I will be investigating this weekend. |
Awesome - no rush at all - thanks! |
Oh , I just tested it in master(00172d0) and it works: |
This comment has been minimized.
This comment has been minimized.
@edwin0cheng just upgraded to the latest nightly and that example works for me! However, here's an example that does not work: I would expect the I've updated the reproduction repository with the code in this screenshot. |
Ah nice that works! So I'm still seeing issues in my real crate such as: But I suppose I can open separate issues for them with reproducible examples. I'll give it some time then come back to Thanks so much! |
Uh oh!
There was an error while loading. Please reload this page.
Hey!
I tried to use the latest nightly of
rust-analyzer
(as of approximately May 15) within VSCode to see if I could get auto complete for some constants that were generated in abuild.rs
.The rust-analyzer tests suggest that it works in
main.rs
- and I'm seeing it work when I create a new project and try to auto-complete withinmain.rs
.As soon as I start to stray from that I lose auto-complete.
For example, if I move the
include!
call tomod bindings
and typebindings::
I can no longer auto complete the constants.Is this a known limitation at this time - or am I perhaps misconfigured? I have the setting to check out dirs on startup turned on.
I could whip up an example project (or rust-analyzer test case if you can point me into the right direction?) if needed - but as far as I can tell as soon as you start trying to import
include!
d types from other modules the auto complete stops working.Thanks and cheers!
The text was updated successfully, but these errors were encountered: