rust-lang / rustc-dev-guide

A guide to how rustc works and how to contribute to it.
https://rustc-dev-guide.rust-lang.org
Apache License 2.0
1.65k stars 507 forks source link

Fix getting diagnostics example #2067

Closed vetleras closed 1 week ago

vetleras commented 2 weeks ago

This PR is motivated by this PR over in the rust repo.

The example was broken as described in the aforementioned PR, but was also broken by this PR. I have 'fixed' that by calling reset_err_count, but I have no idea whether that actually is the appropriate way to handle the abort-on-error behavior.