1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use reporting::{error, note, File, Location, Renderer, Styles};

fn main() {
    let file = File::new("test.txt", "import stds;");
    let styles = Styles::styled();

    print!(
        "{}",
        Renderer::new(
            &styles,
            &[
                error!("Could not find package `{}`", "stds")
                    .location(Location::new(file.clone(), 7)),
                note!("Perhaps you meant `std`?")
            ]
        )
    );
}