Skip to content

Inconsistent treatment of carriage return in // and //// comments #40624

Closed
@qnighy

Description

@qnighy

Although // and //// are both regarded as non-doc-comments, there is a difference in treatment of carriage return.

That is,

// Non-doc-comment with bare CR: '^M'
//// Non-doc-comment with bare CR: '^M'
fn main () {}

where '^M' is a carriage return, fails at line 2.

At least rustc diagnoses a wrong message: "bare CR not allowed in doc-comment".

Tested on Rust 1.16.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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