Registry Mirror
Skip to content

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

This ended up passing through the lexer but dying later on in parsing when it
wasn't handled. The strategy taken was to copy the str_lit funciton, but adapt
it for bytes.

Closes #16278

@lilyball

lilyball commented Aug 5, 2014

Copy link
Copy Markdown
Contributor

str_lit also handles a \r that's not backslash-prefixed. I don't see that in binary_lit. How does it behave if you embed a raw \r or a \r\n sequence in a byte string literal?

@alexcrichton

Copy link
Copy Markdown
Member Author

Added a clause for that and updated the test as well.

Comment thread src/libsyntax/parse/mod.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be perhaps a bit cleaner if this if-elseif-else is made into a match.

@lilyball

lilyball commented Aug 5, 2014

Copy link
Copy Markdown
Contributor

r=me with comments addressed.

This ended up passing through the lexer but dying later on in parsing when it
wasn't handled. The strategy taken was to copy the `str_lit` funciton, but adapt
it for bytes.

Closes rust-lang#16278
@bors
bors merged commit 74ae05a into rust-lang:master Aug 6, 2014
@alexcrichton
alexcrichton deleted the issue-16728 branch August 6, 2014 21:26
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 25, 2025
Closes rust-lang/rust-clippy#16281

changelog: [`cmp_null`] Don't suggest to inline macro contents instead
of calling them
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE: indexes do not lie on character boundaries with byte literal and \r\n

3 participants