Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
qnighy opened this issue Mar 18, 2017 · 0 comments
Closed

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

qnighy opened this issue Mar 18, 2017 · 0 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@qnighy
Copy link
Contributor

qnighy commented Mar 18, 2017

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.

@steveklabnik steveklabnik added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Mar 18, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this issue May 9, 2017
…ent, r=estebank

Allow bare CR in ////-style comment.

Fixes rust-lang#40624 in a way that bare CR is allowed in all non-doc comments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants