about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authoryukang <moorekang@gmail.com>2022-11-03 14:15:17 +0800
committeryukang <moorekang@gmail.com>2022-11-08 11:17:46 +0800
commit1f21b96dce9c4165bcfae364b4e100953dd8167b (patch)
treed62765f6275c8024822cfbd0884de57a5b06869a /compiler/rustc_errors/src
parent57d3c58ed6e0faf89a62411f96c000ffc9fd3937 (diff)
downloadrust-1f21b96dce9c4165bcfae364b4e100953dd8167b.tar.gz
rust-1f21b96dce9c4165bcfae364b4e100953dd8167b.zip
add 'ty_error_with_guaranteed' and 'const_error_with_guaranteed'
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/diagnostic_builder.rs4
1 files changed, 2 insertions, 2 deletions
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!(