about summary refs log tree commit diff
path: root/compiler/rustc_errors
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-12-15 06:50:18 +0100
committerGitHub <noreply@github.com>2023-12-15 06:50:18 +0100
commitd5af762fe537e93bad30c4f2b3dcb7c6ad0b8c0e (patch)
treeb89b121bb27b071f7df0c466c7500bf1a7276410 /compiler/rustc_errors
parent44fd74aeded304866b24d698f1e16d2b613f805e (diff)
parent742f193ef871aff89a5d818cdb1087f41c66f75d (diff)
downloadrust-d5af762fe537e93bad30c4f2b3dcb7c6ad0b8c0e.tar.gz
rust-d5af762fe537e93bad30c4f2b3dcb7c6ad0b8c0e.zip
Rollup merge of #118888 - compiler-errors:uplift-more-things, r=jackh726
Uplift `TypeAndMut` and `ClosureKind` to `rustc_type_ir`

Uplifts `TypeAndMut` and `ClosureKind`

I know I said I was just going to get rid of `TypeAndMut` (https://github.com/rust-lang/types-team/issues/124) but I think this is much simpler, lol

r? `@jackh726` or `@lcnr`
Diffstat (limited to 'compiler/rustc_errors')
-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())
+    }
+}