diff options
Diffstat (limited to 'editors/code/src/test/fixtures/rust-diagnostics/warning')
-rw-r--r-- | editors/code/src/test/fixtures/rust-diagnostics/warning/unused_variables.json | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/editors/code/src/test/fixtures/rust-diagnostics/warning/unused_variables.json b/editors/code/src/test/fixtures/rust-diagnostics/warning/unused_variables.json new file mode 100644 index 000000000..d1e2be722 --- /dev/null +++ b/editors/code/src/test/fixtures/rust-diagnostics/warning/unused_variables.json | |||
@@ -0,0 +1,72 @@ | |||
1 | { | ||
2 | "message": "unused variable: `foo`", | ||
3 | "code": { | ||
4 | "code": "unused_variables", | ||
5 | "explanation": null | ||
6 | }, | ||
7 | "level": "warning", | ||
8 | "spans": [ | ||
9 | { | ||
10 | "file_name": "driver/subcommand/repl.rs", | ||
11 | "byte_start": 9228, | ||
12 | "byte_end": 9231, | ||
13 | "line_start": 291, | ||
14 | "line_end": 291, | ||
15 | "column_start": 9, | ||
16 | "column_end": 12, | ||
17 | "is_primary": true, | ||
18 | "text": [ | ||
19 | { | ||
20 | "text": " let foo = 42;", | ||
21 | "highlight_start": 9, | ||
22 | "highlight_end": 12 | ||
23 | } | ||
24 | ], | ||
25 | "label": null, | ||
26 | "suggested_replacement": null, | ||
27 | "suggestion_applicability": null, | ||
28 | "expansion": null | ||
29 | } | ||
30 | ], | ||
31 | "children": [ | ||
32 | { | ||
33 | "message": "#[warn(unused_variables)] on by default", | ||
34 | "code": null, | ||
35 | "level": "note", | ||
36 | "spans": [], | ||
37 | "children": [], | ||
38 | "rendered": null | ||
39 | }, | ||
40 | { | ||
41 | "message": "consider prefixing with an underscore", | ||
42 | "code": null, | ||
43 | "level": "help", | ||
44 | "spans": [ | ||
45 | { | ||
46 | "file_name": "driver/subcommand/repl.rs", | ||
47 | "byte_start": 9228, | ||
48 | "byte_end": 9231, | ||
49 | "line_start": 291, | ||
50 | "line_end": 291, | ||
51 | "column_start": 9, | ||
52 | "column_end": 12, | ||
53 | "is_primary": true, | ||
54 | "text": [ | ||
55 | { | ||
56 | "text": " let foo = 42;", | ||
57 | "highlight_start": 9, | ||
58 | "highlight_end": 12 | ||
59 | } | ||
60 | ], | ||
61 | "label": null, | ||
62 | "suggested_replacement": "_foo", | ||
63 | "suggestion_applicability": "MachineApplicable", | ||
64 | "expansion": null | ||
65 | } | ||
66 | ], | ||
67 | "children": [], | ||
68 | "rendered": null | ||
69 | } | ||
70 | ], | ||
71 | "rendered": "warning: unused variable: `foo`\n --> driver/subcommand/repl.rs:291:9\n |\n291 | let foo = 42;\n | ^^^ help: consider prefixing with an underscore: `_foo`\n |\n = note: #[warn(unused_variables)] on by default\n\n" | ||
72 | } | ||