Originally, ancient versions of Rust allowed you to nest block comments.
Then we decided this was too surprising and too hard to parse, so we took
it out. Then we decided that this was too useful to exclude so we added it
back in, but apparently this time we forgot to update the manual. Just
another day in the life of Rust! :)


On Wed, Apr 30, 2014 at 3:00 AM, Phil Dawes <rustp...@phildawes.net> wrote:

> Hello!
>
> Could somebody clarify the block comments structure in rust please? The
> manual says 'Comments in Rust code follow the general C++ style of line and
> block-comment forms, with no nesting of block-comment delimiters.'
> http://static.rust-lang.org/doc/master/rust.html#comments
>
> However the grammar looks like it parses nesting of block comment
> delimiters, and e.g. the following compiles:
>
> fn main() {
>     /* /* */ */ println!("YEAH!");
> }
>
> Is the manual wrong or have I mis-understood it? (racer performs comment
> cleaning which is why I'm interested)
>
> Thanks,
>
> Phil
>
>
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>
>
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to