diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-11 11:22:10 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-11 16:55:10 +1100 |
| commit | fbe68bc40c6e49efa3a6ec4aa2640786853f2479 (patch) | |
| tree | a9abdabe27135363fcb7aa9d0b760715379ac40b /compiler/rustc_errors/src | |
| parent | 29c601aa0b6a1661f22da160be3ff58b6d79fe67 (diff) | |
| download | rust-fbe68bc40c6e49efa3a6ec4aa2640786853f2479.tar.gz rust-fbe68bc40c6e49efa3a6ec4aa2640786853f2479.zip | |
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.
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic_builder.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/diagnostic_builder.rs b/compiler/rustc_errors/src/diagnostic_builder.rs index eda2f384fad..932b8793807 100644 --- a/compiler/rustc_errors/src/diagnostic_builder.rs +++ b/compiler/rustc_errors/src/diagnostic_builder.rs @@ -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() } |
