Rollup merge of #120573 - nnethercote:rm-BorrowckErrors-tainted_by_errors, r=oli-obk
Remove `BorrowckErrors::tainted_by_errors` This PR removes one of the `tainted_by_errors` occurrences, replacing it with direct use of `ErrorGuaranteed`. r? `@oli-obk`
This commit is contained in:
commit
019d28151d
7 changed files with 88 additions and 91 deletions
|
@ -255,13 +255,8 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
|
|||
/// Stashes diagnostic for possible later improvement in a different,
|
||||
/// later stage of the compiler. The diagnostic can be accessed with
|
||||
/// the provided `span` and `key` through [`DiagCtxt::steal_diagnostic()`].
|
||||
pub fn stash(self, span: Span, key: StashKey) {
|
||||
self.dcx.stash_diagnostic(span, key, self.into_diagnostic());
|
||||
}
|
||||
|
||||
/// Converts the builder to a `Diagnostic` for later emission.
|
||||
pub fn into_diagnostic(mut self) -> Diagnostic {
|
||||
self.take_diag()
|
||||
pub fn stash(mut self, span: Span, key: StashKey) {
|
||||
self.dcx.stash_diagnostic(span, key, self.take_diag());
|
||||
}
|
||||
|
||||
/// Delay emission of this diagnostic as a bug.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue