Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

Commit c74cb4b

Browse files
committed
Refactor rustfix tests a bit
To allow us to add more fixture tests modes soon.
1 parent 17bcea9 commit c74cb4b

14 files changed

+32
-27
lines changed
File renamed without changes.
File renamed without changes.

tests/fixtures/E0178.json renamed to tests/everything/E0178.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"level": "error",
88
"spans": [
99
{
10-
"file_name": "./tests/fixtures/E0178.rs",
10+
"file_name": "./tests/everything/E0178.rs",
1111
"byte_start": 60,
1212
"byte_end": 74,
1313
"line_start": 6,
@@ -34,7 +34,7 @@
3434
"level": "help",
3535
"spans": [
3636
{
37-
"file_name": "./tests/fixtures/E0178.rs",
37+
"file_name": "./tests/everything/E0178.rs",
3838
"byte_start": 60,
3939
"byte_end": 74,
4040
"line_start": 6,
@@ -58,7 +58,7 @@
5858
"rendered": null
5959
}
6060
],
61-
"rendered": "error[E0178]: expected a path on the left-hand side of `+`, not `&'a Foo`\n --> ./tests/fixtures/E0178.rs:6:8\n |\n6 | w: &'a Foo + Send,\n | ^^^^^^^^^^^^^^ help: try adding parentheses: `&'a (Foo + Send)`\n\nIf you want more information on this error, try using \"rustc --explain E0178\"\n"
61+
"rendered": "error[E0178]: expected a path on the left-hand side of `+`, not `&'a Foo`\n --> ./tests/everything/E0178.rs:6:8\n |\n6 | w: &'a Foo + Send,\n | ^^^^^^^^^^^^^^ help: try adding parentheses: `&'a (Foo + Send)`\n\nIf you want more information on this error, try using \"rustc --explain E0178\"\n"
6262
}
6363
{
6464
"message": "aborting due to previous error",
File renamed without changes.

tests/fixtures/closure-immutable-outer-variable.json renamed to tests/everything/closure-immutable-outer-variable.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"level": "error",
88
"spans": [
99
{
10-
"file_name": "./tests/fixtures/closure-immutable-outer-variable.rs",
10+
"file_name": "./tests/everything/closure-immutable-outer-variable.rs",
1111
"byte_start": 615,
1212
"byte_end": 624,
1313
"line_start": 19,
@@ -34,7 +34,7 @@
3434
"level": "help",
3535
"spans": [
3636
{
37-
"file_name": "./tests/fixtures/closure-immutable-outer-variable.rs",
37+
"file_name": "./tests/everything/closure-immutable-outer-variable.rs",
3838
"byte_start": 580,
3939
"byte_end": 581,
4040
"line_start": 18,
@@ -58,7 +58,7 @@
5858
"rendered": null
5959
}
6060
],
61-
"rendered": "error[E0594]: cannot assign to captured outer variable in an `FnMut` closure\n --> ./tests/fixtures/closure-immutable-outer-variable.rs:19:26\n |\n18 | let y = true;\n | - help: consider making `y` mutable: `mut y`\n19 | foo(Box::new(move || y = false) as Box<_>); //~ ERROR cannot assign to captured outer variable\n | ^^^^^^^^^\n\nIf you want more information on this error, try using \"rustc --explain E0594\"\n"
61+
"rendered": "error[E0594]: cannot assign to captured outer variable in an `FnMut` closure\n --> ./tests/everything/closure-immutable-outer-variable.rs:19:26\n |\n18 | let y = true;\n | - help: consider making `y` mutable: `mut y`\n19 | foo(Box::new(move || y = false) as Box<_>); //~ ERROR cannot assign to captured outer variable\n | ^^^^^^^^^\n\nIf you want more information on this error, try using \"rustc --explain E0594\"\n"
6262
}
6363
{
6464
"message": "aborting due to previous error",

tests/fixtures/lt-generic-comp.json renamed to tests/everything/lt-generic-comp.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"level": "error",
55
"spans": [
66
{
7-
"file_name": "./tests/fixtures/lt-generic-comp.rs",
7+
"file_name": "./tests/everything/lt-generic-comp.rs",
88
"byte_start": 49,
99
"byte_end": 50,
1010
"line_start": 4,
@@ -24,7 +24,7 @@
2424
"expansion": null
2525
},
2626
{
27-
"file_name": "./tests/fixtures/lt-generic-comp.rs",
27+
"file_name": "./tests/everything/lt-generic-comp.rs",
2828
"byte_start": 47,
2929
"byte_end": 48,
3030
"line_start": 4,
@@ -51,7 +51,7 @@
5151
"level": "help",
5252
"spans": [
5353
{
54-
"file_name": "./tests/fixtures/lt-generic-comp.rs",
54+
"file_name": "./tests/everything/lt-generic-comp.rs",
5555
"byte_start": 38,
5656
"byte_end": 46,
5757
"line_start": 4,
@@ -75,7 +75,7 @@
7575
"rendered": null
7676
}
7777
],
78-
"rendered": "error: `<` is interpreted as a start of generic arguments for `u32`, not a comparison\n --> ./tests/fixtures/lt-generic-comp.rs:4:17\n |\n4 | if x as u32 < 4 {\n | -------- ^ - interpreted as generic arguments\n | | |\n | | not interpreted as comparison\n | help: try comparing the cast value: `(x as u32)`\n\n"
78+
"rendered": "error: `<` is interpreted as a start of generic arguments for `u32`, not a comparison\n --> ./tests/everything/lt-generic-comp.rs:4:17\n |\n4 | if x as u32 < 4 {\n | -------- ^ - interpreted as generic arguments\n | | |\n | | not interpreted as comparison\n | help: try comparing the cast value: `(x as u32)`\n\n"
7979
}
8080
{
8181
"message": "aborting due to previous error",

0 commit comments

Comments
 (0)