-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: Map tokens from include!
expansion to the included file
#14561
Conversation
include!
expansion to the included fileinclude!
expansion to the included file
@bors r+ |
just have to say: this is awesome and i'm really thankful you managed to make this change. |
☀️ Test successful - checks-actions |
1 similar comment
☀️ Test successful - checks-actions |
👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request. |
I'm running the nightly version (I believe, based on I am getting the following error when trying to jump to the code:
This happens when I hover over And when I CMD+Click to follow it anyway, it jumps to the end of the file where the I have tried with the following setting in vscode too (to no avail): {
"rust-analyzer.cargo.buildScripts.enable": true,
} I'm unsure if the |
include-go-to-def.mp4 |
With opencv-rust crate, goto definition works fine for the functions like |
Yeah, about 1233 open ones 😬. There are some known situations where we pick up the wrong trait member. If you could minimize it (outside of |
How do we enable this feature? |
@TroyKomodo Go to definition should work, as seen in the recording above. If it doesn't work for you and it's not #14611, please file a new issue. |
@lnicola Does it expected with submacros? mod generated {
include!(concat!(env!("OUT_DIR"), "/generated.rs"))
} |
That's what the gdal-sys crate (from the recording) does: https://github.com/georust/gdal/blob/master/gdal-sys/src/lib.rs. |
Fixes #3767