Skip to content

Handle raw string literals in CharClasses - #2983

Merged
nrc merged 3 commits into
rust-lang:masterfrom
topecongiro:issue-2642
Sep 4, 2018
Merged

Handle raw string literals in CharClasses#2983
nrc merged 3 commits into
rust-lang:masterfrom
topecongiro:issue-2642

Conversation

@topecongiro

Copy link
Copy Markdown
Contributor

Closes #2642.

@nrc nrc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good except for the nit about unreachable.

Comment thread src/comment.rs
match chr {
'#' => CharClassesStatus::RawStringPrefix(sharps + 1),
'"' => CharClassesStatus::LitRawString(sharps),
_ => CharClassesStatus::Normal, // Unreachable.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Here and below, could we use unreachable!?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I am not sure... That part should be unreachable in normal code, but could be reachable in macro call.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK. I think it would be good to clarify that in the comment, but no need to block the PR on it.

@nrc
nrc merged commit f655671 into rust-lang:master Sep 4, 2018
@topecongiro
topecongiro deleted the issue-2642 branch July 21, 2019 05:03
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.

2 participants