ErrorThrowingDiagnosticCollector
A type that conforms to the DiagnosticCollector
protocol.
struct ErrorThrowingDiagnosticCollector
It receives diagnostics and forwards them to an upstream DiagnosticCollector
.
If a diagnostic with a severity of .error
is emitted, this collector will throw the diagnostic as an error.