summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/crates/rustfix/tests/edge-cases/indented_whitespace.json
blob: b25189aaf27a4ca81c12b552ddf4fadff43f3219 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
    "message": "non-ASCII whitespace symbol '\\u{a0}' is not skipped",
    "code": null,
    "level": "warning",
    "spans":
    [
        {
            "file_name": "lib.rs",
            "byte_start": 26,
            "byte_end": 28,
            "line_start": 2,
            "line_end": 2,
            "column_start": 1,
            "column_end": 2,
            "is_primary": false,
            "text":
            [
                {
                    "text": " indented\";",
                    "highlight_start": 1,
                    "highlight_end": 2
                }
            ],
            "label": "non-ASCII whitespace symbol '\\u{a0}' is not skipped",
            "suggested_replacement": null,
            "suggestion_applicability": null,
            "expansion": null
        },
        {
            "file_name": "lib.rs",
            "byte_start": 24,
            "byte_end": 28,
            "line_start": 1,
            "line_end": 2,
            "column_start": 25,
            "column_end": 2,
            "is_primary": true,
            "text":
            [
                {
                    "text": "pub static FOO: &str = \"\\",
                    "highlight_start": 25,
                    "highlight_end": 26
                },
                {
                    "text": " indented\";",
                    "highlight_start": 1,
                    "highlight_end": 2
                }
            ],
            "label": null,
            "suggested_replacement": null,
            "suggestion_applicability": null,
            "expansion": null
        }
    ],
    "children":
    [],
    "rendered": "warning: non-ASCII whitespace symbol '\\u{a0}' is not skipped\n --> lib.rs:1:25\n  |\n1 |   pub static FOO: &str = \"\\\n  |  _________________________^\n2 | |  indented\";\n  | | ^ non-ASCII whitespace symbol '\\u{a0}' is not skipped\n  | |_|\n  | \n\n"
}