diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-05-31 12:37:05 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-05-31 12:37:05 +0200 |
| commit | 9bbebd69ddb4a7d7da98c3a79ff7d0cb187873fd (patch) | |
| tree | 0fc651f43337d65e13cccb2bbe85ab1b79666725 /src/main.rs | |
| parent | 08a6188123ad0806986fa4f5477b728a07d081cc (diff) | |
Numbered spans
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 33302eee..d518a03b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -240,7 +240,7 @@ fn print_diagnostics( for error in errors { // The main diagnostic. let diag = Diagnostic::error().with_message(error.message).with_labels(vec![ - Label::primary(error.span.source, error.span.to_range()), + Label::primary(error.span.source(), sources.range(error.span)), ]); term::emit(&mut w, &config, sources, &diag)?; @@ -249,7 +249,7 @@ fn print_diagnostics( for point in error.trace { let message = point.v.to_string(); let help = Diagnostic::help().with_message(message).with_labels(vec![ - Label::primary(point.span.source, point.span.to_range()), + Label::primary(point.span.source(), sources.range(point.span)), ]); term::emit(&mut w, &config, sources, &help)?; |
