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

Multiple comment slashes lead to error #10638

Closed
vmx opened this issue Nov 24, 2013 · 2 comments · Fixed by #10642
Closed

Multiple comment slashes lead to error #10638

vmx opened this issue Nov 24, 2013 · 2 comments · Fixed by #10642

Comments

@vmx
Copy link
Contributor

vmx commented Nov 24, 2013

When you have more than three slashes, you will get an expected item after attributes
error. This should be a special case and not expect a doc attribute. Here's code that reproduces the issue.

fn main() {
    //// x
}

The same it true for more than two stars is a multiline comment (/*** x */).

@alexcrichton
Copy link
Member

I'm very ok with this (this has bitten me more than once), but this is a language change that should be discussed a little further than just my own opinion.

@emberian
Copy link
Member

Yes, definitely.

bors added a commit that referenced this issue Nov 27, 2013
Previously, `//// foo` and `/*** foo ***/` were accepted as doc comments. This
changes that, so that only `/// foo` and `/** foo ***/` are accepted. This
confuses many newcomers and it seems weird.

Also update the manual for these changes, and modernify the EBNF for comments.

Closes #10638
flip1995 pushed a commit to flip1995/rust that referenced this issue Apr 23, 2023
… r=Alexendoo

Standardize lint formulation

Fixes rust-lang#10631

changelog: Standardize a very frequent lint formulation which had variations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants