Skip to content

Mistake in Documentation #45

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

Closed
AS1100K opened this issue Dec 28, 2024 · 1 comment
Closed

Mistake in Documentation #45

AS1100K opened this issue Dec 28, 2024 · 1 comment

Comments

@AS1100K
Copy link

AS1100K commented Dec 28, 2024

The Path struct has a field name which is documented to only contain it's name without it's complete path, i.e.

use rustdoc_types::Item;

pub struct Bar<'a> {
    pub root_item: &'a Item,
}

Here, name field for the StructField, root_item should be Item but it is rustdoc_types::Item.

File used for docs: https://github.com/AS1100K/cargo-wiki/blob/main/src/generators/module_gen.rs
Generator Used: cargo-wiki, a cargo extension I am working on.

I would be happy to contribute here and open a PR for the same but want to clarify first that this issue is with documentation of rustdoc_types or issue with json generation

@aDotInTheVoid
Copy link
Member

Thanks for finding and reporting this! I've written up rust-lang/rust#134853 based on this. I'm going to close this issue in favor of that.

(As said there) I'm not sure if the right fix is in the documentation or the json generation. If you have thaughts on this, please post them.

If you want to contribute a fix to this (or any other improvement to rustdoc-json), that would be much appreciated. Just do it to the rust-lang/rust repo and r? me

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

2 participants