fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
2.6 KiB106 linesraw
1{
2  "message": "unnecessary parentheses around assigned value",
3  "code": {
4    "code": "unused_parens",
5    "explanation": null
6  },
7  "level": "warning",
8  "spans": [
9    {
10      "file_name": "$DIR/unused_parens_json_suggestion.rs",
11      "byte_start": 654,
12      "byte_end": 667,
13      "line_start": 17,
14      "line_end": 17,
15      "column_start": 14,
16      "column_end": 27,
17      "is_primary": true,
18      "text": [
19        {
20          "text": "    let _a = (1 / (2 + 3));",
21          "highlight_start": 14,
22          "highlight_end": 27
23        }
24      ],
25      "label": null,
26      "suggested_replacement": null,
27      "suggestion_applicability": null,
28      "expansion": null
29    }
30  ],
31  "children": [
32    {
33      "message": "lint level defined here",
34      "code": null,
35      "level": "note",
36      "spans": [
37        {
38          "file_name": "$DIR/unused_parens_json_suggestion.rs",
39          "byte_start": 472,
40          "byte_end": 485,
41          "line_start": 11,
42          "line_end": 11,
43          "column_start": 9,
44          "column_end": 22,
45          "is_primary": true,
46          "text": [
47            {
48              "text": "#![warn(unused_parens)]",
49              "highlight_start": 9,
50              "highlight_end": 22
51            }
52          ],
53          "label": null,
54          "suggested_replacement": null,
55          "suggestion_applicability": null,
56          "expansion": null
57        }
58      ],
59      "children": [],
60      "rendered": null
61    },
62    {
63      "message": "remove these parentheses",
64      "code": null,
65      "level": "help",
66      "spans": [
67        {
68          "file_name": "$DIR/unused_parens_json_suggestion.rs",
69          "byte_start": 654,
70          "byte_end": 667,
71          "line_start": 17,
72          "line_end": 17,
73          "column_start": 14,
74          "column_end": 27,
75          "is_primary": true,
76          "text": [
77            {
78              "text": "    let _a = (1 / (2 + 3));",
79              "highlight_start": 14,
80              "highlight_end": 27
81            }
82          ],
83          "label": null,
84          "suggested_replacement": "1 / (2 + 3)",
85          "suggestion_applicability": "MachineApplicable",
86          "expansion": null
87        }
88      ],
89      "children": [],
90      "rendered": null
91    }
92  ],
93  "rendered": "warning: unnecessary parentheses around assigned value
94  --> $DIR/unused_parens_json_suggestion.rs:17:14
95   |
96LL |     let _a = (1 / (2 + 3));
97   |              ^^^^^^^^^^^^^ help: remove these parentheses
98   |
99note: lint level defined here
100  --> $DIR/unused_parens_json_suggestion.rs:11:9
101   |
102LL | #![warn(unused_parens)]
103   |         ^^^^^^^^^^^^^
104
105"
106}