about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-12-12 18:54:49 +0000
committerMichael Goulet <michael@errs.io>2023-12-12 23:24:44 +0000
commitb8ea6e686f996a158838e39c7515df449dcc55be (patch)
tree876955456bd03a3c196e23f88b38ac9cd3eb5ab5 /compiler/rustc_errors/src
parent835ed0021e149cacb2d464cdbc35816b5d551c0e (diff)
downloadrust-b8ea6e686f996a158838e39c7515df449dcc55be.tar.gz
rust-b8ea6e686f996a158838e39c7515df449dcc55be.zip
Uplift ClosureKind
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/diagnostic_impls.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_errors/src/diagnostic_impls.rs b/compiler/rustc_errors/src/diagnostic_impls.rs
index 4f77f09b26e..558262460c7 100644
--- a/compiler/rustc_errors/src/diagnostic_impls.rs
+++ b/compiler/rustc_errors/src/diagnostic_impls.rs
@@ -378,3 +378,9 @@ pub struct IndicateAnonymousLifetime {
     pub count: usize,
     pub suggestion: String,
 }
+
+impl IntoDiagnosticArg for type_ir::ClosureKind {
+    fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
+        DiagnosticArgValue::Str(self.as_str().into())
+    }
+}