Skip to content

Empty doc tests should be linted #60319

Closed
@phrohdoh

Description

@phrohdoh

Run tests for https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=8ac29ea8121d53906e7a77cd01ccbe70 and you'll get the following diagnostic:

warning: invalid start of a new code block
 --> /playground/src/lib.rs:1:1
  |
1 | //! Hello
  | ^^^^^^^^^

But to be as helpful as possible the diagnostic should, if possible, point to the start of the invalid code block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-doctestsArea: Documentation tests, run by rustdocE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.T-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