macros: support translatable labels
Extends support for generating `DiagnosticMessage::FluentIdentifier` messages from `SessionDiagnostic` derive to `#[label]`. Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
@@ -277,7 +277,7 @@ impl Diagnostic {
|
||||
///
|
||||
/// This span is *not* considered a ["primary span"][`MultiSpan`]; only
|
||||
/// the `Span` supplied when creating the diagnostic is primary.
|
||||
pub fn span_label<T: Into<String>>(&mut self, span: Span, label: T) -> &mut Self {
|
||||
pub fn span_label(&mut self, span: Span, label: impl Into<DiagnosticMessage>) -> &mut Self {
|
||||
self.span.push_span_label(span, label.into());
|
||||
self
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user