Skip to content

Commit 6e25cfb

Browse files
committed
[ty] Add regression test for diagnostic rendering panic
This converts the MRE in #670 into a fixture test for `annotate-snippets`.
1 parent 7638729 commit 6e25cfb

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
Lines changed: 36 additions & 0 deletions
Loading
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[message]
2+
level = "Error"
3+
id = "E0308"
4+
title = "mismatched types"
5+
6+
[[message.snippets]]
7+
source = """
8+
s_data['d_dails'] = bb['contacted'][hostip]['ansible_facts']['ansible_devices']['vda']['vendor'] + " " + bb['contacted'][hostip]['an
9+
"""
10+
line_start = 4
11+
origin = "$DIR/non-whitespace-trimming.rs"
12+
13+
[[message.snippets.annotations]]
14+
label = ""
15+
level = "Error"
16+
range = [5, 11]
17+
18+
[renderer]
19+
# anonymized_line_numbers = true
20+
color = true

0 commit comments

Comments
 (0)