Skip to content
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

Can no longer go to (any) documentation/definitions of any standard types/primitives/keywords in rustlings #289

Closed
razlani opened this issue Apr 2, 2020 · 10 comments

Comments

@razlani
Copy link

razlani commented Apr 2, 2020

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.

@shadows-withal
Copy link
Member

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.

@razlani
Copy link
Author

razlani commented Apr 3, 2020

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.

@shadows-withal
Copy link
Member

Do you happen to know what version of Rustlings you were using before?

@razlani
Copy link
Author

razlani commented Apr 3, 2020

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 :-)

@razlani
Copy link
Author

razlani commented Apr 3, 2020

  • 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.

@shadows-withal
Copy link
Member

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.

@razlani
Copy link
Author

razlani commented Apr 12, 2020

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.

intellij-rust/intellij-rust#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) :/

@hardselius
Copy link

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.

@jrvidal
Copy link
Contributor

jrvidal commented Mar 12, 2021

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.

@mo8it
Copy link
Contributor

mo8it commented Mar 27, 2024

Closing because the used plugin is replaced by RustRover and many things have changed in Rustlings since 2020.

@mo8it mo8it closed this as completed Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants