codespan-derive 0.1.1

derive(IntoDiagnostic) for easy codespan integration
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pub use codespan_derive_proc::IntoDiagnostic;
pub use codespan_reporting::diagnostic::{Diagnostic, Label, LabelStyle};

pub trait IntoDiagnostic {
    type FileId;

    fn into_diagnostic(&self) -> Diagnostic<Self::FileId>;
}

pub trait IntoLabel {
    type FileId;

    fn into_label(&self, style: LabelStyle) -> Label<Self::FileId>;
}