From 3b949eb7c1eff22e89c4889e191d916ad028ff28 Mon Sep 17 00:00:00 2001 From: SLASHLogin Date: Thu, 3 Nov 2022 13:09:25 +0100 Subject: Add `replace_args` method for `rustc_errors::diagnostic::Diagnostic` --- compiler/rustc_errors/src/diagnostic.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/rustc_errors') diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index b6370354b24..8c76db84392 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -940,6 +940,10 @@ impl Diagnostic { self } + pub fn replace_args(&mut self, args: FxHashMap, DiagnosticArgValue<'static>>) { + self.args = args; + } + pub fn styled_message(&self) -> &[(DiagnosticMessage, Style)] { &self.message } -- cgit 1.4.1-3-g733a5