1
Fork 0

Stop using DiagnosticBuilder::buffer in BorrowckErrors.

But we can't easily switch from `Vec<Diagnostic>` to
`Vec<DiagnosticBuilder<G>>` because there's a mix of errors and warnings
which result in different `G` types. So we must make
`DiagnosticBuilder::into_diagnostic` public, but that's ok, and it will
get more use in subsequent commits.
This commit is contained in:
Nicholas Nethercote 2024-01-11 11:22:10 +11:00
parent 29c601aa0b
commit fbe68bc40c
2 changed files with 11 additions and 10 deletions

View file

@ -260,7 +260,7 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
}
/// Converts the builder to a `Diagnostic` for later emission.
fn into_diagnostic(mut self) -> Diagnostic {
pub fn into_diagnostic(mut self) -> Diagnostic {
self.take_diag()
}