-
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
Modules in paths are highlighted inconsistently #6842
Comments
I can't reproduce this outside of What do you get if you choose "Inspect Editor Tokens and Scopes" and move the cursor over the two |
This hangs for me. How long does it normally take? It's been over three minutes. |
If it helps, 'go to definition' on |
It should be instantaneous. It shows a pop-up with highlight information, without even calling into the LSP server. |
Well it is definitely not instantaneous for me 😆 in case it matters, I'm using VSCode Remote-SSH. |
this is unrelated, it works on a different project, just not rust-lang/rust. |
I think @jonas-schievink might be able to test this. |
Can reproduce. None of the (naturally, all tokens in the The output panel contains this, normally this only breaks paths to libcore, but maybe it decided to break rustc crates this time:
This is on rust-lang/rust@1e88a17 with rust-analyzer 2020-12-14. |
Ahh, that's probably it - those crates are loaded from the sysroot, not from cargo. Didn't rust-analyzer add support for rustc_private recently? Or am I misremembering? If it helps, you don't need to use the toolchain directly (and it would be hard because it's a stage 1 build), you can just look at the sources in compiler/. |
Oh, yeah, if they're from the sysroot then that explains it. I'm not sure how our support looks there. |
This can be fixed by setting Closing as fixed in any case! |
That seems wrong, it should use the in-tree sources, not the sources of the beta compiler. I think Thanks for the workaround :) I'll add this to the dev-guide. |
Err, I guess it depends if it's building with stage 0 or stage 1. But I doubt there's any way to get rust-analyzer to know about both, so hard-coding stage1 seems fine, that's the one |
Wait no, I was right the first time. The sysroot for stage 0 tools is newly built compiler. /~https://github.com/rust-lang/rust/blob/2bd17c1d43bba43412cc2f051323a279d6751e43/src/bootstrap/builder.rs#L1080 |
ast::
is two different colors; it should be the same in both (maybe green is correct?)./~https://github.com/rust-lang/rust/blob/c3ed6681ff8d446e68ce272be4bf66f4145f6e29/src/librustdoc/clean/types.rs#L620-L628
The text was updated successfully, but these errors were encountered: