basic/
basic.rs

1use reporting::{error, note, File, Location, Renderer, Styles};
2
3fn main() {
4    let file = File::new("test.txt", "import stds;");
5    let styles = Styles::styled();
6
7    print!(
8        "{}",
9        Renderer::new(
10            &styles,
11            &[
12                error!("Could not find package `{}`", "stds")
13                    .location(Location::new(file.clone(), 7)),
14                note!("Perhaps you meant `std`?")
15            ]
16        )
17    );
18}