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>
This commit is contained in:
parent
a9eb9c52f3
commit
7d2eba6311
5 changed files with 8 additions and 7 deletions
|
@ -550,7 +550,7 @@ impl<'a, 'tcx> ConstToPat<'a, 'tcx> {
|
|||
id,
|
||||
span,
|
||||
|lint| {
|
||||
lint.build(&msg).emit();
|
||||
lint.build(msg).emit();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue