-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Use enum for message kind in compiletest harness. #32341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -84,8 +124,9 @@ fn parse_expected(last_nonfollow_error: Option<usize>, | |||
let letters = line[kind_start..].chars(); | |||
let kind = letters.skip_while(|c| c.is_whitespace()) | |||
.take_while(|c| !c.is_whitespace()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surely we have some higher-level way to extract the first word from the string by now? Can't we just call split_whitespace()
or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 73f4321
.parse::<ErrorKind>() | ||
.ok(); | ||
let kind = line[kind_start..].split_whitespace() | ||
.next() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
much better :)
@bors r+ |
📌 Commit 73f4321 has been approved by |
Use enum for message kind in compiletest harness. None
No description provided.