simple errors for lang-dev
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -35,6 +35,15 @@ impl<S: ToString> From<(Span, S)> for Label { } } +impl<S: ToString> From<(&Span, S)> for Label { + fn from((span, m): (&Span, S)) -> Self { + Self { + span: span.clone(), + message: m.to_string(), + } + } +} + /// A note at the end of the diagnostic #[derive(Debug)] pub struct Note { |