]> git.lizzy.rs Git - rust.git/commit
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)
commitb79fbe0dae488513e4fead02a7da84102d932749
treecb71fd4becff68bcda0543f943d93764d4c92c60
parente42521aa58be928dd62b5450c443368d29ab6a65
parentafaa3b6a2066e4dacd4e7dafb5fd911bf35bdd6c
rollup merge of #23625: fhahn/issue-23620-ice-unicode-bytestring

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.