Skip to content

Conversation

@lifthrasiir
Copy link
Contributor

This is a natural extension of #4887, and handles the following three cases:

a line with only /s
////////////////////////////////////////////

a line with only /s followed by whitespace
////////////////////////////////////////////         

a block comment with only *s between two /s
/********************************/

@brendanzab
Copy link
Contributor

Would you also be able to skip trailing doc comments at the end of blocks? ie:

mod foo {
    fn bar() {}
    /// blah blah
}

Rustc produces a confusing error if you do this (see issue #4106).

@lifthrasiir
Copy link
Contributor Author

@bjz Uh, that is more complicated, and certainly requires complex refactoring that expands doc-comments into attributes only when really required. I generally agree on brson's thoughts mentioned in that issue, and this patch is only intended as a quick fix for particularly annoying cases.

@brendanzab
Copy link
Contributor

Sure no worries. Thanks anyway, this is most useful!

@lifthrasiir
Copy link
Contributor Author

My bad, simply replacing 2012 by 2012-2013 didn't pass make check. Added another case to licenseck.py for this case.

bors added a commit that referenced this pull request Feb 15, 2013
…hism

This is a natural extension of #4887, and handles the following three cases:

~~~~
a line with only /s
////////////////////////////////////////////

a line with only /s followed by whitespace
////////////////////////////////////////////         

a block comment with only *s between two /s
/********************************/
~~~~
@bors bors closed this Feb 15, 2013
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 this pull request may close these issues.

5 participants