Skip to content

Add a way to signal that a snippet is UB/bad in rustdoc #62410

@Izzeri

Description

@Izzeri

Reading the docs for MaybeUninit I noticed that the code snippets that contain code that lead to UB are only identified by comments inside the snippet. This feels like a potential source of copy-paste errors. Maybe there could be a way to highlight a code snippet in a bright red or something to make readers wary that this code should never be used?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-doctestsArea: Documentation tests, run by rustdocC-enhancementCategory: An issue proposing an enhancement or a PR with one.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions