diff options
| author | David Wood <david.wood@huawei.com> | 2022-06-27 11:38:45 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2022-06-30 08:58:41 +0100 |
| commit | 7d2eba6311dfaf615866442fb9e3730a8d888748 (patch) | |
| tree | c26fa6464b46c74a06543b383e5ce2684f57baf9 /compiler/rustc_errors | |
| parent | a9eb9c52f3e8d8b6402e6acc69b9bcfc4f371d58 (diff) | |
| download | rust-7d2eba6311dfaf615866442fb9e3730a8d888748.tar.gz rust-7d2eba6311dfaf615866442fb9e3730a8d888748.zip | |
middle: translation in `LintDiagnosticBuilder`
Accept `DiagnosticMessage` in `LintDiagnosticBuilder::build` so that lints can be built with translatable diagnostic messages. Signed-off-by: David Wood <david.wood@huawei.com>
Diffstat (limited to 'compiler/rustc_errors')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic_builder.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/diagnostic_builder.rs b/compiler/rustc_errors/src/diagnostic_builder.rs index 9e0a99849a3..1ad33ef25b7 100644 --- a/compiler/rustc_errors/src/diagnostic_builder.rs +++ b/compiler/rustc_errors/src/diagnostic_builder.rs @@ -529,7 +529,7 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> { applicability: Applicability, ) -> &mut Self); - forward!(pub fn set_primary_message(&mut self, msg: impl Into<String>) -> &mut Self); + forward!(pub fn set_primary_message(&mut self, msg: impl Into<DiagnosticMessage>) -> &mut Self); forward!(pub fn set_span(&mut self, sp: impl Into<MultiSpan>) -> &mut Self); forward!(pub fn code(&mut self, s: DiagnosticId) -> &mut Self); forward!(pub fn set_arg( |
