File: error.rs

package info (click to toggle)
rust-chic 1.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 200 kB
  • sloc: makefile: 4
file content (16 lines) | stat: -rw-r--r-- 342 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use chic::Error;

fn main() {
    let src = r#"This is an example
content of the slice
which will be annotated
with the list of annotations below.
"#;

    let msg = Error::new("expected type, found `x`")
        .error(260, 0, 12, src, "found `x`")
        .help("try using a foobs intead")
        .to_string();

    println!("{}", msg);
}