-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rustdoc generate files for items not used in documentation #111249
Comments
GuillaumeGomez
added
C-bug
Category: This is a bug.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
labels
May 5, 2023
Also, don't forget to update |
All assertions in this test case pass: #![crate_name="foo"]
// @!has "foo/struct.Foo.html"
#[doc(hidden)]
pub struct Foo;
// @has "foo/struct.Bar.html"
pub use crate::Foo as Bar;
// @!has "foo/struct.Baz.html"
#[doc(hidden)]
pub use crate::Foo as Baz; This test case fails: #![crate_name="foo"]
// This assertion fails. The file gets generated.
// @!has "foo/foo/index.html"
#[doc(hidden)]
pub mod foo {}
// This assertion passes.
// @has "foo/bar/index.html"
pub use crate::foo as bar;
// This assertion also fails. The file gets generated.
// @!has "foo/baz/index.html"
#[doc(hidden)]
pub use crate::foo as baz; |
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Jun 21, 2023
…e-creation, r=notriddle [rustdoc] partially fix invalid files creation Part of rust-lang#111249. It only removes generation for modules which shouldn't exist. For files, we need the compiler to keep re-export information alive for external items so we can actually have the right path to their location as it's currently not generating them correctly. In case the item is inlined, it shouldn't (and neither should its children) get a file generated. r? `@notriddle`
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Jun 21, 2023
…e-creation, r=notriddle [rustdoc] partially fix invalid files creation Part of rust-lang#111249. It only removes generation for modules which shouldn't exist. For files, we need the compiler to keep re-export information alive for external items so we can actually have the right path to their location as it's currently not generating them correctly. In case the item is inlined, it shouldn't (and neither should its children) get a file generated. r? ``@notriddle``
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Jun 21, 2023
…e-creation, r=notriddle [rustdoc] partially fix invalid files creation Part of rust-lang#111249. It only removes generation for modules which shouldn't exist. For files, we need the compiler to keep re-export information alive for external items so we can actually have the right path to their location as it's currently not generating them correctly. In case the item is inlined, it shouldn't (and neither should its children) get a file generated. r? ```@notriddle```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As demonstrated in the following codes:
And the other example:
Examples come from #111249.
The text was updated successfully, but these errors were encountered: