Repository navigation
rustdoc: Correctly handle reexports when --document-private-items is used - #161362
Conversation
| //@ hasraw - "Mod1Public" | ||
| //@ !hasraw - "Mod1Private" | ||
| //@ !hasraw - "mod2" | ||
| //@ hasraw - "Mod1Private" |
There was a problem hiding this comment.
Fun fact: this test was added in 2016 in #37773. :)
This comment has been minimized.
This comment has been minimized.
bdb8873 to
9baaae5
Compare
This comment has been minimized.
This comment has been minimized.
9baaae5 to
7d595c2
Compare
|
I was wondering if this was a breaking change, but our documentation clearly states:
as such, this seems clearly like a bug fix. |
This comment was marked as resolved.
This comment was marked as resolved.
7d595c2 to
819238e
Compare
|
So now, all |
|
@rustbot ready |
819238e to
5862ffc
Compare
|
Applied suggestions. |
This comment has been minimized.
This comment has been minimized.
8844d76 to
59f6fd9
Compare
| // we're documenting private item. If we are, then we want all items, except if it's a | ||
| // `use`. In this case, we want to check if it's a reexport. To do so, we check if there is | ||
| // a `pub(...)` part with its `vis_span` field. |
There was a problem hiding this comment.
This comment needs updating, it still talks about checking vis_span.
There was a problem hiding this comment.
Ah indeed, removing that part.
…private, r=Urgau rustdoc: Correctly handle reexports when --document-private-items is used Fixes rust-lang#159109. This PR makes the (private) reexport work like the public ones when the `--document-private-items` option is used. I still differentiate between imports (`use`) and reexports (`pub(...) use`) in this PR as I don't think we should display imports. r? @Urgau
|
@bors yield to rollup |
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #164882. |
Rollup of 11 pull requests Successful merges: - #161362 ( rustdoc: Correctly handle reexports when --document-private-items is used) - #162808 (Enable `--generate-link-to-definition` rustdoc option on std docs) - #164834 (miri subtree update) - #164869 (rustc_codegen_gcc subtree update) - #157123 (library: optimize truncate method) - #159916 (Optimize `str.escape_default().to_string()`) - #164508 (ping me for layout invariant changes) - #164758 (Update dependency jinja2 to v3.1.6 [SECURITY]) - #164857 (Do not checkout Cargo for bootstrap tests) - #164872 (cg_llvm: clarify Send / Sync story for modules) - #164881 (Add FIXME comments to `from_ascii_bytes_radix_impl`)
|
⌛ Testing commit f87a2da with merge d652736... Workflow: https://github.com/rust-lang/rust/actions/runs/40156114629 |
…Urgau rustdoc: Correctly handle reexports when --document-private-items is used Fixes #159109. This PR makes the (private) reexport work like the public ones when the `--document-private-items` option is used. I still differentiate between imports (`use`) and reexports (`pub(...) use`) in this PR as I don't think we should display imports. r? @Urgau
|
I think this failed in rollup: #164882 (comment) |
|
This pull request was unapproved. This PR was contained in a rollup (#164882), which was unapproved. Auto build was cancelled due to unapproval. Cancelled workflows: |
…<try> rustdoc: Correctly handle reexports when --document-private-items is used try-job: dist-aarch64-msvc
This comment has been minimized.
This comment has been minimized.
|
Huh, nevermind... |
…private, r=Urgau rustdoc: Correctly handle reexports when --document-private-items is used Fixes rust-lang#159109. This PR makes the (private) reexport work like the public ones when the `--document-private-items` option is used. I still differentiate between imports (`use`) and reexports (`pub(...) use`) in this PR as I don't think we should display imports. r? @Urgau
…uwer Rollup of 12 pull requests Successful merges: - #161362 ( rustdoc: Correctly handle reexports when --document-private-items is used) - #164764 (Test(lib/sync): Fix `test_rwlock_max_readers` for 32bit architectures) - #164869 (rustc_codegen_gcc subtree update) - #157123 (library: optimize truncate method) - #159916 (Optimize `str.escape_default().to_string()`) - #164508 (ping me for layout invariant changes) - #164758 (Update dependency jinja2 to v3.1.6 [SECURITY]) - #164836 (Add regression test for #162109) - #164857 (Do not checkout Cargo for bootstrap tests) - #164868 (Fix skipping library build with `--keep-stage[-std]`) - #164872 (cg_llvm: clarify Send / Sync story for modules) - #164881 (Add FIXME comments to `from_ascii_bytes_radix_impl`)
…uwer Rollup of 20 pull requests Successful merges: - #160404 (fd-views: AsRef<File>&Co. for BorrowedFd) - #161362 ( rustdoc: Correctly handle reexports when --document-private-items is used) - #163769 (reborrow: Fix various ICEs related to auto reborrowing of user-space types) - #164764 (Test(lib/sync): Fix `test_rwlock_max_readers` for 32bit architectures) - #164860 (std::fs: read interrupted by a signal, read_buf_exact_at reports EOF.) - #164869 (rustc_codegen_gcc subtree update) - #157123 (library: optimize truncate method) - #159916 (Optimize `str.escape_default().to_string()`) - #163510 (process: Improve the output of `Debug` for `ExitStatus` on Unix) - #164508 (ping me for layout invariant changes) - #164758 (Update dependency jinja2 to v3.1.6 [SECURITY]) - #164816 (Take the colon span into account for struct field initializers) - #164836 (Add regression test for #162109) - #164846 (Remove contradictory inequalities from overflow safety docs) - #164857 (Do not checkout Cargo for bootstrap tests) - #164868 (Fix skipping library build with `--keep-stage[-std]`) - #164872 (cg_llvm: clarify Send / Sync story for modules) - #164880 (Add context span showing item that can't be annotated) - #164881 (Add FIXME comments to `from_ascii_bytes_radix_impl`) - #164884 (Windows: bounds-check the reparse point name in `read_link`)
…uwer Rollup of 20 pull requests Successful merges: - #160404 (fd-views: AsRef<File>&Co. for BorrowedFd) - #161362 ( rustdoc: Correctly handle reexports when --document-private-items is used) - #163769 (reborrow: Fix various ICEs related to auto reborrowing of user-space types) - #164764 (Test(lib/sync): Fix `test_rwlock_max_readers` for 32bit architectures) - #164860 (std::fs: read interrupted by a signal, read_buf_exact_at reports EOF.) - #164869 (rustc_codegen_gcc subtree update) - #157123 (library: optimize truncate method) - #159916 (Optimize `str.escape_default().to_string()`) - #163510 (process: Improve the output of `Debug` for `ExitStatus` on Unix) - #164508 (ping me for layout invariant changes) - #164758 (Update dependency jinja2 to v3.1.6 [SECURITY]) - #164816 (Take the colon span into account for struct field initializers) - #164836 (Add regression test for #162109) - #164846 (Remove contradictory inequalities from overflow safety docs) - #164857 (Do not checkout Cargo for bootstrap tests) - #164868 (Fix skipping library build with `--keep-stage[-std]`) - #164872 (cg_llvm: clarify Send / Sync story for modules) - #164880 (Add context span showing item that can't be annotated) - #164881 (Add FIXME comments to `from_ascii_bytes_radix_impl`) - #164884 (Windows: bounds-check the reparse point name in `read_link`)
Rollup merge of #161362 - GuillaumeGomez:reexports-document-private, r=Urgau rustdoc: Correctly handle reexports when --document-private-items is used Fixes #159109. This PR makes the (private) reexport work like the public ones when the `--document-private-items` option is used. I still differentiate between imports (`use`) and reexports (`pub(...) use`) in this PR as I don't think we should display imports. r? @Urgau
|
Note This PR was benchmarked as part of triage of its containing rollup: triage URL. Finished benchmarking commit (2c386ff): comparison URL. Overall result: ❌ regressions - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 0.7%, secondary 29.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 0.9%, secondary 63.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Artifact size: 405.87 MiB -> 405.94 MiB (0.02%) |
View all comments
Fixes #159109.
This PR makes the (private) reexport work like the public ones when the
--document-private-itemsoption is used. I still differentiate between imports (use) and reexports (pub(...) use) in this PR as I don't think we should display imports.r? @Urgau