Skip to content

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

Closed
@qnighy

Description

@qnighy
Contributor

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.

Activity

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

    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

        Participants

        @steveklabnik@qnighy

        Issue actions

          Inconsistent treatment of carriage return in // and //// comments · Issue #40624 · rust-lang/rust