auto merge of #9936 : madjar/rust/master, r=alexcrichton
This should close #9468. I removed the test stating that nested comments should not be implemented. I had a little chicken-and-egg problem because a comment of the std contains "/*", and adding support for nested comment creates a backward incompatibility in that case, so I had to use a dirty hack to get stage1 and stage2 to compile. This part should be revert when this commit lands in a snapshot. This is my first non-typo contribution, so I'm open to any comment.
This commit is contained in:
commit
6dd6623b71
4 changed files with 71 additions and 76 deletions
|
|
@ -8,19 +8,12 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// error-pattern:
|
||||
|
||||
/* This is a test to ensure that we do _not_ support nested/balanced comments. I know you might be
|
||||
thinking "but nested comments are cool", and that would be a valid point, but they are also a
|
||||
thing that would make our lexical syntax non-regular, and we do not want that to be true.
|
||||
|
||||
omitting-things at a higher level (tokens) should be done via token-trees / macros,
|
||||
not comments.
|
||||
/* This test checks that nested comments are supported
|
||||
|
||||
/*
|
||||
fail here
|
||||
This should not fail
|
||||
*/
|
||||
*/
|
||||
|
||||
fn main() {
|
||||
pub fn main() {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue