Skip to content

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

Merged
merged 2 commits into from
Mar 22, 2016

Conversation

frewsxcv
Copy link
Member

No description provided.

@frewsxcv
Copy link
Member Author

r? @nikomatsakis

@@ -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())
Copy link
Contributor

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?

Copy link
Member Author

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()
Copy link
Contributor

Choose a reason for hiding this comment

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

much better :)

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 22, 2016

📌 Commit 73f4321 has been approved by nikomatsakis

@bors
Copy link
Collaborator

bors commented Mar 22, 2016

⌛ Testing commit 73f4321 with merge c7bdfd4...

bors added a commit that referenced this pull request Mar 22, 2016
Use enum for message kind in compiletest harness.

None
@bors bors merged commit 73f4321 into rust-lang:master Mar 22, 2016
@frewsxcv frewsxcv deleted the compiletest-enum branch March 22, 2016 17:21
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.

3 participants