Fix BLOCK_COMMENT in the context of SHEBANG This fixes an issue with the BLOCK_COMMENT grammar as it is used within the SHEBANG rule. The problem is that BLOCK_COMMENT was changed in https://github.com/rust-lang/reference/pull/2191 so that it relied on the order of how the comments were handled in the COMMENT rule to avoid ambiguity with OUTER_BLOCK_DOC. However, because SHEBANG is using the BLOCK_COMMENT rule directly, we need BLOCK_COMMENT to be able to stand on its own without relying on the order in COMMENT. This fixes an issue with shebang such as: #! /** doc */ [attr] Here this should be treated as a shebang (because it is a doc block comment). The solution is to do the appropriate negative lookahead to exclude OUTER_BLOCK_DOC and INNER_BLOCK_DOC.
This document is the primary reference for the Rust programming language.
See the Reference Developer Guide for information on contributing to the Reference.