Skip to content

Not Recognizing gl_generated (large user-made crate) in all parts of the files #3648

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

Closed
TimVanDyke opened this issue Mar 19, 2020 · 1 comment
Labels
S-actionable Someone could pick this issue up and work on it right now

Comments

@TimVanDyke
Copy link

TimVanDyke commented Mar 19, 2020

Hello, I don't know if this is a duplicate or how best to describe it but I'll do my best:

I generated and am using gl bindings from the gl_generator crate as described here:

at the top of the file in my use declaration I can put use gl:: and it suggests everything as expected (types, enums, etc) and I can pick them there:
image

However when I only have use gl at the top of my file and go and start coding and want to use any values from it later if I type gl::, I get no intellisense suggestions from the gl crate:
image

BUT I do get good gl function intellisense when I call gl. on my gl pointer:
image

I used gl_generator to generate myself the library and then copied the bindings into the file so they are visible. It's also clear they are visible because in the use declaration all of the crate is visible as suggestions.

EDIT1: Added pictures and was more clear
EDIT2: Found a work around:
instead of use gl; just have use gl::*; and skip the gl:: invocation on the types. Works perfectly.

Thank you all for the work you do to make Programming in Rust comfy!

@lnicola
Copy link
Member

lnicola commented Jan 25, 2021

@TimVanDyke can you test this again?

(Marking S-actionable, if you look at this in the future and the OP hasn't answered, ping me so we can close it).

@lnicola lnicola added the S-actionable Someone could pick this issue up and work on it right now label Jan 25, 2021
@Veykril Veykril closed this as completed May 25, 2022
lnicola pushed a commit to lnicola/rust-analyzer that referenced this issue Jul 16, 2024
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

No branches or pull requests

3 participants