From 1f21b96dce9c4165bcfae364b4e100953dd8167b Mon Sep 17 00:00:00 2001 From: yukang Date: Thu, 3 Nov 2022 14:15:17 +0800 Subject: add 'ty_error_with_guaranteed' and 'const_error_with_guaranteed' --- compiler/rustc_errors/src/diagnostic_builder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_errors/src') diff --git a/compiler/rustc_errors/src/diagnostic_builder.rs b/compiler/rustc_errors/src/diagnostic_builder.rs index ecf8570e81f..730061fca99 100644 --- a/compiler/rustc_errors/src/diagnostic_builder.rs +++ b/compiler/rustc_errors/src/diagnostic_builder.rs @@ -482,9 +482,9 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> { /// In the meantime, though, callsites are required to deal with the "bug" /// locally in whichever way makes the most sense. #[track_caller] - pub fn delay_as_bug(&mut self) { + pub fn delay_as_bug(&mut self) -> G { self.downgrade_to_delayed_bug(); - self.emit(); + self.emit() } forward!( -- cgit 1.4.1-3-g733a5