]> git.lizzy.rs Git - rust.git/commit
macros: Cancel DiagnosticBuilder when not emitting error
authorKamal Marhubi <kamal@marhubi.com>
Thu, 7 Apr 2016 20:29:05 +0000 (16:29 -0400)
committerKamal Marhubi <kamal@marhubi.com>
Thu, 7 Apr 2016 22:05:57 +0000 (18:05 -0400)
commita8c27c70862cf8497ac1f48a8c950b30f46e906f
tree734516750e95de89401c8733ce1d61f4b65643d2
parentc59d96a747e4d6d6391ece2d50ee3d88e878282d
macros: Cancel DiagnosticBuilder when not emitting error

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.
src/macros.rs