-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add the ability to open a specific module when running cargo doc --open
#5368
Comments
I want to do this. Wouldn't it be better to use For parsing the module would it be preferred to use something like https://github.com/dtolnay/syn ? |
I don't really have a strong preference for the specific command line argument, personally.
I don't think I'm following why you need to parse the source code here; shouldn't you just be able to map the argument |
That was also my first thought but what if the user enters |
I don't see why that should be supported. If the user wants to pass a filesystem path, they can just chain the build command with their OS command. For example, I could do I don't understand why someone would combine modules and filesystem paths either. |
That's why I'm currently trying to find a method to prevent or mitigate that:
Another thing that is currently unanswered for me is if rustdoc applies some transformation to the module path segments to map them to directory and file names? If yes are they documented somewhere? Edit: |
Implements rust-lang#5368
I'm in the process of documenting a library, so I'm doing a lot of:
This is great because my editor has a command for running
cargo doc --open
, so the cycle is pretty tight. However, when I start documenting a module, I have to click a few times before I can start reading. It'd be neat to be able to do something akin tocargo doc --open --module my::cool::module
.For opening to a specific package, see #10516
The text was updated successfully, but these errors were encountered: