Skip to content

rustdoc: Tracking issue for heavily increasing the JSON test coverage #81359

Open

Description

@CraftSpider

Currently, the output of rustdoc's JSON backend has very few tests, which only assure some of the most simple functionality. It would be nice to at least have tests for basic forms of each item, as well as any known issues. A quick list of things not really tested (non-exhaustive):

  • Impls
  • Associated Items
  • Consts/Statics
  • Extern items (all forms)
  • Macros
  • Types

It also would be nice to know the desired layout of the tests. Currently, the directory holds the form

root
| structs
- | plain
  | tuple
  | generic
| traits
- | has_body
| unions
- | plain
| ...

This is slightly different from how normal rustdoc ui tests are structured, but on the other hand HTML output is very different and serves a somewhat different goal. If we want to establish guidelines on the test directory layout, now is a good time to discuss it, before the directories fill up.

Activity

  1. added
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    on Jan 24, 2021
  2. added
    A-testsuiteArea: The testsuite used to check the correctness of rustc
    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
    on Jan 24, 2021
  3. added 3 commits that reference this issue on Mar 11, 2021
  4. added 3 commits that reference this issue on Feb 11, 2022
  5. added a commit that references this issue on Mar 15, 2022
  6. 14 remaining items

  7. added 4 commits that reference this issue on Aug 30, 2024
  8. added 2 commits that reference this issue on Aug 31, 2024
  9. added a commit that references this issue on Aug 31, 2024
  10. added a commit that references this issue on Dec 2, 2024
  11. added a commit that references this issue on Dec 2, 2024
  12. added a commit that references this issue on Mar 8, 2025
  13. added a commit that references this issue on Mar 8, 2025
  14. added 2 commits that reference this issue on Mar 18, 2025
  15. added a commit that references this issue on Mar 18, 2025
  16. changed the title [-][rustdoc-json] Output is currently under-tested[/-] [+]rustdoc: Tracking issue for heavily increasing the JSON test coverage[/+] on Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-jsonArea: Rustdoc JSON backendA-testsuiteArea: The testsuite used to check the correctness of rustcC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions