Skip to content

Warn on Fullwidth Exclamation Mark (U+FF01) in comment #134810

Open
@dtolnay

Description

@dtolnay
//! A
//!B
//! C

For the above Rust source code, rustdoc produces documentation containing only "A C". The line containing "B" is only a comment. The comment starts with https://www.compart.com/en/unicode/U+FF01.

I caught this in a real-world documentation PR from a Chinese contributor. See #134241 (review).

In GitHub, the distinction is practically invisible.

In my text editor, it is more obvious.

Would it be reasonable for rustc and/or rustdoc to have reported a lint on such code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-UnicodeArea: UnicodeA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.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