Skip to content

Commit

Permalink
test(rustfix): bless multiple-solutions.nightly.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed May 9, 2024
1 parent 9908f0c commit 3a3fc64
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::collections::{HashSet};
use std::collections::HashSet;

fn main() {
let _: HashSet<()>;
Expand Down
64 changes: 58 additions & 6 deletions crates/rustfix/tests/everything/multiple-solutions.nightly.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$message_type": "diagnostic",
"message": "unused imports: `HashMap`, `VecDeque`",
"code": {
"code": "unused_imports",
Expand All @@ -7,7 +8,7 @@
"level": "warning",
"spans": [
{
"file_name": "src/main.rs",
"file_name": "./tests/everything/multiple-solutions.nightly.rs",
"byte_start": 23,
"byte_end": 30,
"line_start": 1,
Expand All @@ -28,7 +29,7 @@
"expansion": null
},
{
"file_name": "src/main.rs",
"file_name": "./tests/everything/multiple-solutions.nightly.rs",
"byte_start": 41,
"byte_end": 49,
"line_start": 1,
Expand All @@ -51,7 +52,7 @@
],
"children": [
{
"message": "#[warn(unused_imports)] on by default",
"message": "`#[warn(unused_imports)]` on by default",
"code": null,
"level": "note",
"spans": [],
Expand All @@ -64,7 +65,28 @@
"level": "help",
"spans": [
{
"file_name": "src/main.rs",
"file_name": "./tests/everything/multiple-solutions.nightly.rs",
"byte_start": 22,
"byte_end": 23,
"line_start": 1,
"line_end": 1,
"column_start": 23,
"column_end": 24,
"is_primary": true,
"text": [
{
"text": "use std::collections::{HashMap, HashSet, VecDeque};",
"highlight_start": 23,
"highlight_end": 24
}
],
"label": null,
"suggested_replacement": "",
"suggestion_applicability": "MachineApplicable",
"expansion": null
},
{
"file_name": "./tests/everything/multiple-solutions.nightly.rs",
"byte_start": 23,
"byte_end": 32,
"line_start": 1,
Expand All @@ -85,7 +107,7 @@
"expansion": null
},
{
"file_name": "src/main.rs",
"file_name": "./tests/everything/multiple-solutions.nightly.rs",
"byte_start": 39,
"byte_end": 49,
"line_start": 1,
Expand All @@ -104,11 +126,41 @@
"suggested_replacement": "",
"suggestion_applicability": "MachineApplicable",
"expansion": null
},
{
"file_name": "./tests/everything/multiple-solutions.nightly.rs",
"byte_start": 49,
"byte_end": 50,
"line_start": 1,
"line_end": 1,
"column_start": 50,
"column_end": 51,
"is_primary": true,
"text": [
{
"text": "use std::collections::{HashMap, HashSet, VecDeque};",
"highlight_start": 50,
"highlight_end": 51
}
],
"label": null,
"suggested_replacement": "",
"suggestion_applicability": "MachineApplicable",
"expansion": null
}
],
"children": [],
"rendered": null
}
],
"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"
"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"
}
{
"$message_type": "diagnostic",
"message": "1 warning emitted",
"code": null,
"level": "warning",
"spans": [],
"children": [],
"rendered": "warning: 1 warning emitted\n\n"
}

0 comments on commit 3a3fc64

Please sign in to comment.