Skip to content

Commit 67aa704

Browse files
weihangloepage
authored andcommitted
test(rustfix): bless multiple-solutions.nightly.rs
1 parent 8bfa91b commit 67aa704

File tree

2 files changed

+59
-7
lines changed

2 files changed

+59
-7
lines changed

crates/rustfix/tests/everything/multiple-solutions.nightly.fixed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::collections::{HashSet};
1+
use std::collections::HashSet;
22

33
fn main() {
44
let _: HashSet<()>;

crates/rustfix/tests/everything/multiple-solutions.nightly.json

+58-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$message_type": "diagnostic",
23
"message": "unused imports: `HashMap`, `VecDeque`",
34
"code": {
45
"code": "unused_imports",
@@ -7,7 +8,7 @@
78
"level": "warning",
89
"spans": [
910
{
10-
"file_name": "src/main.rs",
11+
"file_name": "./tests/everything/multiple-solutions.nightly.rs",
1112
"byte_start": 23,
1213
"byte_end": 30,
1314
"line_start": 1,
@@ -28,7 +29,7 @@
2829
"expansion": null
2930
},
3031
{
31-
"file_name": "src/main.rs",
32+
"file_name": "./tests/everything/multiple-solutions.nightly.rs",
3233
"byte_start": 41,
3334
"byte_end": 49,
3435
"line_start": 1,
@@ -51,7 +52,7 @@
5152
],
5253
"children": [
5354
{
54-
"message": "#[warn(unused_imports)] on by default",
55+
"message": "`#[warn(unused_imports)]` on by default",
5556
"code": null,
5657
"level": "note",
5758
"spans": [],
@@ -64,7 +65,28 @@
6465
"level": "help",
6566
"spans": [
6667
{
67-
"file_name": "src/main.rs",
68+
"file_name": "./tests/everything/multiple-solutions.nightly.rs",
69+
"byte_start": 22,
70+
"byte_end": 23,
71+
"line_start": 1,
72+
"line_end": 1,
73+
"column_start": 23,
74+
"column_end": 24,
75+
"is_primary": true,
76+
"text": [
77+
{
78+
"text": "use std::collections::{HashMap, HashSet, VecDeque};",
79+
"highlight_start": 23,
80+
"highlight_end": 24
81+
}
82+
],
83+
"label": null,
84+
"suggested_replacement": "",
85+
"suggestion_applicability": "MachineApplicable",
86+
"expansion": null
87+
},
88+
{
89+
"file_name": "./tests/everything/multiple-solutions.nightly.rs",
6890
"byte_start": 23,
6991
"byte_end": 32,
7092
"line_start": 1,
@@ -85,7 +107,7 @@
85107
"expansion": null
86108
},
87109
{
88-
"file_name": "src/main.rs",
110+
"file_name": "./tests/everything/multiple-solutions.nightly.rs",
89111
"byte_start": 39,
90112
"byte_end": 49,
91113
"line_start": 1,
@@ -104,11 +126,41 @@
104126
"suggested_replacement": "",
105127
"suggestion_applicability": "MachineApplicable",
106128
"expansion": null
129+
},
130+
{
131+
"file_name": "./tests/everything/multiple-solutions.nightly.rs",
132+
"byte_start": 49,
133+
"byte_end": 50,
134+
"line_start": 1,
135+
"line_end": 1,
136+
"column_start": 50,
137+
"column_end": 51,
138+
"is_primary": true,
139+
"text": [
140+
{
141+
"text": "use std::collections::{HashMap, HashSet, VecDeque};",
142+
"highlight_start": 50,
143+
"highlight_end": 51
144+
}
145+
],
146+
"label": null,
147+
"suggested_replacement": "",
148+
"suggestion_applicability": "MachineApplicable",
149+
"expansion": null
107150
}
108151
],
109152
"children": [],
110153
"rendered": null
111154
}
112155
],
113-
"rendered": "warning: unused imports: `HashMap`, `VecDeque`\n --> src/main.rs:1:24\n |\n1 | use std::collections::{HashMap, HashSet, VecDeque};\n | ^^^^^^^ ^^^^^^^^\n |\n = note: #[warn(unused_imports)] on by default\nhelp: remove the unused imports\n |\n1 | use std::collections::{HashSet};\n | -- --\n\n"
156+
"rendered": "warning: unused imports: `HashMap`, `VecDeque`\n --> ./tests/everything/multiple-solutions.nightly.rs:1:24\n |\n1 | use std::collections::{HashMap, HashSet, VecDeque};\n | ^^^^^^^ ^^^^^^^^\n |\n = note: `#[warn(unused_imports)]` on by default\n\n"
157+
}
158+
{
159+
"$message_type": "diagnostic",
160+
"message": "1 warning emitted",
161+
"code": null,
162+
"level": "warning",
163+
"spans": [],
164+
"children": [],
165+
"rendered": "warning: 1 warning emitted\n\n"
114166
}

0 commit comments

Comments
 (0)