Crates.io | reporting |
lib.rs | reporting |
version | 0.1.4 |
source | src |
created_at | 2024-07-11 07:27:50.558235 |
updated_at | 2024-11-02 12:17:03.796642 |
description | Simple diagnostic reporting for compilers |
homepage | |
repository | https://github.com/pzipper/reporting |
max_upload_size | |
id | 1299264 |
size | 847,988 |
Simple diagnostic reporting for compilers.
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`?")
]
)
)
}