rustlings
rustlings copied to clipboard
Can no longer go to (any) documentation/definitions of any standard types/primitives/keywords in rustlings
Editor: CLion 2019.3
IntelliJ Rust plugin: 0.2.119.2172-193
Rustup:
stable-x86_64-pc-windows-msvc (default)
rustc 1.42.0 (b8cedc004 2020-03-09)
I used to be able to go to base definition/bring up quick documentation within CLion in the rustlings repo upon using the relevant shortcuts.
I've tried cargo doc/clean/build with no joy.
Doing a:
cargo new project-name
And going to the same snippets of code in another project correctly navigates me to documentation/definition. For example copy/pasting the std library modules in main:
fn main() {
use std::error;
use std::fmt;
use std::io;
println!("Hello, world!");
}
Outside of rustlings, I can print documentation on the print macro for example, or 'use declaration' on the std::io module to navigate to the std library type.
Did you update Rustlings or something? You said you used to be able to do it before, so something about your Rustlings checkout has to have changed, right? Otherwise, I wouldn't say it's a Rustlings problem.
Yeah updated rustup to a nightly build and then back to stable. I've tried with a new checkout of Rustlings as per instructions (clone, checkout latest tag etc) with no joy.
I think it's a rustlings problem because every other project works fine - although I confess that something has changed as it likely worked in the past.
Do you happen to know what version of Rustlings you were using before?
I would guess version 2. https://github.com/fmoko/rustlings/tree/2.0.0
Good idea btw - I'll also checkout that version and see if the doc etc works locally, but the gf needs some TLC so I'll be back :-)
- No joy. I check out v2, do a cargo build and a rustlings watch and nada.
But when I copy/paste the rustlings code in to another project, tadaa - documentation/navigation to source works.
I've also tried reinstalling the rust plugin. Updating either the plugin or the editor itself may have caused issues? Other than that I'm clutching for straws.
As a workaround I copy paste the exercise source into another project and complete it there as intellisense/tooltips/documentation are super helpful.
Hm, unfortunately I have no idea why this happens. I'm gonna leave this open and attach the help-wanted
label so maybe we get some more context if someone else has this issue.
Hm, unfortunately I have no idea why this happens. I'm gonna leave this open and attach the
help-wanted
label so maybe we get some more context if someone else has this issue.
https://github.com/intellij-rust/intellij-rust/issues/4302 This may be the issue as I have that warning atop my editor and it seems like it could be it? - In saying that: I've briefly tried two of of the solutions (invalidate cache and rm -rf the .idea folder, with no joy) :/
Has anyone come up with a solution for this yet? I struggled a fair bit with this using rust-analyzer. I'm still learning rust, so I'm not entirely sure, but I guess the exercises are not part of a create and that's why language server stuff breaks.
My guess this is the same as #443: the rustlings project structure is not that of a standard Rust project and IDEs choke with it. Not idea why it used to work though.