Skip to content

Commit 9a1032c

Browse files
committed
use new feature in example
1 parent 95f12bb commit 9a1032c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

codespan-reporting/examples/term.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ fn main() -> anyhow::Result<()> {
128128
.with_message("`case` clauses have incompatible types")
129129
.with_code("E0308")
130130
.with_labels(vec![
131-
Label::primary(file_id3, 163..166).with_message("expected `String`, found `Nat`"),
132-
Label::secondary(file_id3, 62..166)
131+
Label::primary_anon(163..166).with_message("expected `String`, found `Nat`"),
132+
Label::secondary_anon(62..166)
133133
.with_message("`case` clauses have incompatible types"),
134-
Label::secondary(file_id3, 41..47)
135-
.with_message("expected type `String` found here"),
134+
Label::secondary_anon(41..47).with_message("expected type `String` found here"),
136135
])
136+
.with_file(file_id3)
137137
.with_notes(vec![unindent::unindent(
138138
"
139139
expected type `String`
@@ -145,18 +145,18 @@ fn main() -> anyhow::Result<()> {
145145
.with_message("`case` clauses have incompatible types")
146146
.with_code("E0308")
147147
.with_labels(vec![
148-
Label::primary(file_id3, 328..331).with_message("expected `String`, found `Nat`"),
149-
Label::secondary(file_id3, 211..331)
148+
Label::primary_anon(328..331).with_message("expected `String`, found `Nat`"),
149+
Label::secondary_anon(211..331)
150150
.with_message("`case` clauses have incompatible types"),
151-
Label::secondary(file_id3, 258..268)
151+
Label::secondary_anon(258..268)
152152
.with_message("this is found to be of type `String`"),
153-
Label::secondary(file_id3, 284..290)
153+
Label::secondary_anon(284..290)
154154
.with_message("this is found to be of type `String`"),
155-
Label::secondary(file_id3, 306..312)
155+
Label::secondary_anon(306..312)
156156
.with_message("this is found to be of type `String`"),
157-
Label::secondary(file_id3, 186..192)
158-
.with_message("expected type `String` found here"),
157+
Label::secondary_anon(186..192).with_message("expected type `String` found here"),
159158
])
159+
.with_file(file_id3)
160160
.with_notes(vec![unindent::unindent(
161161
"
162162
expected type `String`

0 commit comments

Comments
 (0)