diff options
| author | SLASHLogin <loginmlgxd@gmail.com> | 2022-11-03 13:09:25 +0100 |
|---|---|---|
| committer | SLASHLogin <loginmlgxd@gmail.com> | 2022-11-09 14:56:21 +0100 |
| commit | 3b949eb7c1eff22e89c4889e191d916ad028ff28 (patch) | |
| tree | 5cc5c546bcdec6e87b34caca61194e721ac9015d /compiler/rustc_errors/src | |
| parent | b4820a3b94787a6f0018d8064d974163f6a202fa (diff) | |
| download | rust-3b949eb7c1eff22e89c4889e191d916ad028ff28.tar.gz rust-3b949eb7c1eff22e89c4889e191d916ad028ff28.zip | |
Add `replace_args` method for `rustc_errors::diagnostic::Diagnostic`
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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<DiagnosticArgName<'static>, DiagnosticArgValue<'static>>) { + self.args = args; + } + pub fn styled_message(&self) -> &[(DiagnosticMessage, Style)] { &self.message } |
