Expand description
Simple diagnostic reporting for compilers.
use reporting::{error, note, File, Location, Renderer, Styles};
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`?")
]
)
);
Re-exports§
pub use anstyle;
Macros§
- bug
- format macro which creates a
Severity::Bug
report. - error
- format macro which creates a
Severity::Error
report. - note
- format macro which creates a
Severity::Note
report. - warning
- format macro which creates a
Severity::Warning
report.
Structs§
- File
- Information about a file.
- Location
- A location in a file.
- Renderer
- A renderer for diagnostic reports.
- Report
- A diagnostic report.
- Styles
- The styles used to render Reports.
Enums§
- Severity
- The severity of a diagnostic.