]> git.lizzy.rs Git - rust.git/commitdiff
rollup merge of #23625: fhahn/issue-23620-ice-unicode-bytestring
authorAlex Crichton <alex@alexcrichton.com>
Fri, 27 Mar 2015 17:07:41 +0000 (10:07 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 27 Mar 2015 17:07:41 +0000 (10:07 -0700)
closes #23620

This PR patches the issue mentioned in #23620, but there is also an ICE for invalid escape sequences in byte literals. This is due to the fact that the `scan_byte` function returns ` token::intern("??") ` for invalid bytes, resulting in an ICE later on. Is there a reason for this behavior? Shouldn't `scan_byte` fail when it encounters an invalid byte?

And I noticed a small inconsistency in the documentation. According to the formal byte literal definition in http://doc.rust-lang.org/reference.html#byte-and-byte-string-literals , a byte string literal contains `string_body *`, but according to the text (and the behavior of the lexer) it should not accept unicode escape sequences. Hence it should be replaced by `byte_body *`. If this is valid, I can add this fix to this PR.


Trivial merge