diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 2c1d0037aa6..7d5e4723a6d 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -51,6 +51,9 @@ fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> { match self { DiagnosticArgValue::Str(s) => DiagnosticArgValue::Str(Cow::Owned(s.into_owned())), DiagnosticArgValue::Number(n) => DiagnosticArgValue::Number(n), + DiagnosticArgValue::StrListSepByAnd(l) => DiagnosticArgValue::StrListSepByAnd( + l.into_iter().map(|s| Cow::Owned(s.into_owned())).collect(), + ), } } }