Skip to content
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

macros: Cancel DiagnosticBuilder when not emitting error #910

Merged
merged 1 commit into from
Apr 8, 2016

Conversation

kamalmarhubi
Copy link
Contributor

The error handling in libsyntax changed to use a DiagnosticBuilder
type in the Err variant of PResult. This type has emit() and
cancel() methods. Once created, errors must be emitted or canceled; if
not, the Drop impl on DiagnosticBuilder will panic.

The first syntex_syntax release to include this change was v0.25.0. The
bump from v0.23.0 to v0.29.1 in #847 did not add any cancel() calls,
even though at least one was required. There may be others not caught in
this commit.

The error handling in libsyntax changed to use a `DiagnosticBuilder`
type in the `Err` variant of `PResult`. This type has `emit()` and
`cancel()` methods. Once created, errors must be emitted or canceled; if
not, the `Drop` impl on `DiagnosticBuilder` will panic.

The first syntex_syntax release to include this change was v0.25.0. The
bump from v0.23.0 to v0.29.1 in rust-lang#847 did not add any `cancel()` calls,
even though at least one was required. There may be others not caught in
this commit.
@nrc nrc merged commit 6cec513 into rust-lang:master Apr 8, 2016
@nrc
Copy link
Member

nrc commented Apr 8, 2016

Thank you!

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