Skip to content

Document error-pattern header #989

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
Dec 12, 2020
Merged

Conversation

JohnTitor
Copy link
Member

Fixes #986

Copy link
Contributor

@LeSeulArtichaut LeSeulArtichaut left a comment

Choose a reason for hiding this comment

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

Awesome, I didn't know this functionnality at all! ❤️
I left a few nits

@@ -291,6 +294,37 @@ fn main() {
//~| ERROR this pattern has 1 field, but the corresponding tuple struct has 3 fields [E0023]
```

#### When error line cannot be specified

Let's this about this test:
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it is!

}
```

We want to ensure this shows "index out of bounds" but we cannot use the `ERROR` annotation
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe specify "at runtime" to explain why this has the run-fail? I'm not sure this is really necessary though.

Suggested change
We want to ensure this shows "index out of bounds" but we cannot use the `ERROR` annotation
We want to ensure this shows "index out of bounds" at runtime, but we cannot use the `ERROR` annotation

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, copied/pasted headers from the original test but run-fail may be confusing. Just removed it.

@LeSeulArtichaut
Copy link
Contributor

Thanks!

@LeSeulArtichaut LeSeulArtichaut merged commit 3eb8611 into rust-lang:master Dec 12, 2020
@JohnTitor JohnTitor deleted the err-ptn branch December 12, 2020 15:08
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.

Document // error-pattern
2 participants