Skip to content

Commit

Permalink
use new feature in example
Browse files Browse the repository at this point in the history
  • Loading branch information
Johann150 committed Mar 1, 2021
1 parent c26b387 commit 7d88b8b
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions codespan-reporting/examples/term.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,13 @@ fn main() -> anyhow::Result<()> {
.with_message("`case` clauses have incompatible types")
.with_code("E0308")
.with_labels(vec![
Label::primary(file_id3, 163..166).with_message("expected `String`, found `Nat`"),
Label::secondary(file_id3, 62..166)
Label::primary_anon(163..166).with_message("expected `String`, found `Nat`"),
Label::secondary_anon(62..166)
.with_message("`case` clauses have incompatible types"),
Label::secondary(file_id3, 41..47)
Label::secondary_anon(41..47)
.with_message("expected type `String` found here"),
])
.with_file(file_id3)
.with_notes(vec![unindent::unindent(
"
expected type `String`
Expand All @@ -145,18 +146,19 @@ fn main() -> anyhow::Result<()> {
.with_message("`case` clauses have incompatible types")
.with_code("E0308")
.with_labels(vec![
Label::primary(file_id3, 328..331).with_message("expected `String`, found `Nat`"),
Label::secondary(file_id3, 211..331)
Label::primary_anon(328..331).with_message("expected `String`, found `Nat`"),
Label::secondary_anon(211..331)
.with_message("`case` clauses have incompatible types"),
Label::secondary(file_id3, 258..268)
Label::secondary_anon(258..268)
.with_message("this is found to be of type `String`"),
Label::secondary(file_id3, 284..290)
Label::secondary_anon(284..290)
.with_message("this is found to be of type `String`"),
Label::secondary(file_id3, 306..312)
Label::secondary_anon(306..312)
.with_message("this is found to be of type `String`"),
Label::secondary(file_id3, 186..192)
Label::secondary_anon(186..192)
.with_message("expected type `String` found here"),
])
.with_file(file_id3)
.with_notes(vec![unindent::unindent(
"
expected type `String`
Expand Down

0 comments on commit 7d88b8b

Please sign in to comment.