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

Refactor rustfix tests #96

Merged
merged 3 commits into from
May 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ log = "0.4.1"
duct = "0.8.2"
env_logger = "0.5.0-rc.1"
log = "0.4.1"
pretty_assertions = "0.4.1"
tempdir = "0.3.5"
proptest = "0.7.0"
difference = "2.0.0"

[workspace]
members = [
Expand Down
File renamed without changes.
158 changes: 0 additions & 158 deletions tests/everything.rs

This file was deleted.

2 changes: 2 additions & 0 deletions tests/everything/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.recorded.json
*.recorded.rs
6 changes: 3 additions & 3 deletions tests/fixtures/E0178.json → tests/everything/E0178.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"level": "error",
"spans": [
{
"file_name": "./tests/fixtures/E0178.rs",
"file_name": "./tests/everything/E0178.rs",
"byte_start": 60,
"byte_end": 74,
"line_start": 6,
Expand All @@ -34,7 +34,7 @@
"level": "help",
"spans": [
{
"file_name": "./tests/fixtures/E0178.rs",
"file_name": "./tests/everything/E0178.rs",
"byte_start": 60,
"byte_end": 74,
"line_start": 6,
Expand All @@ -58,7 +58,7 @@
"rendered": null
}
],
"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"
"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"
}
{
"message": "aborting due to previous error",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"level": "error",
"spans": [
{
"file_name": "./tests/fixtures/closure-immutable-outer-variable.rs",
"file_name": "./tests/everything/closure-immutable-outer-variable.rs",
"byte_start": 615,
"byte_end": 624,
"line_start": 19,
Expand All @@ -34,7 +34,7 @@
"level": "help",
"spans": [
{
"file_name": "./tests/fixtures/closure-immutable-outer-variable.rs",
"file_name": "./tests/everything/closure-immutable-outer-variable.rs",
"byte_start": 580,
"byte_end": 581,
"line_start": 18,
Expand All @@ -58,7 +58,7 @@
"rendered": null
}
],
"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"
"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"
}
{
"message": "aborting due to previous error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"level": "error",
"spans": [
{
"file_name": "./tests/fixtures/lt-generic-comp.rs",
"file_name": "./tests/everything/lt-generic-comp.rs",
"byte_start": 49,
"byte_end": 50,
"line_start": 4,
Expand All @@ -24,7 +24,7 @@
"expansion": null
},
{
"file_name": "./tests/fixtures/lt-generic-comp.rs",
"file_name": "./tests/everything/lt-generic-comp.rs",
"byte_start": 47,
"byte_end": 48,
"line_start": 4,
Expand All @@ -51,7 +51,7 @@
"level": "help",
"spans": [
{
"file_name": "./tests/fixtures/lt-generic-comp.rs",
"file_name": "./tests/everything/lt-generic-comp.rs",
"byte_start": 38,
"byte_end": 46,
"line_start": 4,
Expand All @@ -75,7 +75,7 @@
"rendered": null
}
],
"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"
"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"
}
{
"message": "aborting due to previous error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"level": "error",
"spans": [
{
"file_name": "./tests/fixtures/str-lit-type-mismatch.rs",
"file_name": "./tests/everything/str-lit-type-mismatch.rs",
"byte_start": 499,
"byte_end": 504,
"line_start": 13,
Expand Down Expand Up @@ -42,7 +42,7 @@
"level": "help",
"spans": [
{
"file_name": "./tests/fixtures/str-lit-type-mismatch.rs",
"file_name": "./tests/everything/str-lit-type-mismatch.rs",
"byte_start": 499,
"byte_end": 504,
"line_start": 13,
Expand All @@ -66,7 +66,7 @@
"rendered": null
}
],
"rendered": "error[E0308]: mismatched types\n --> ./tests/fixtures/str-lit-type-mismatch.rs:13:20\n |\n13 | let x: &[u8] = \"foo\"; //~ ERROR mismatched types\n | ^^^^^\n | |\n | expected slice, found str\n | help: consider adding a leading `b`: `b\"foo\"`\n |\n = note: expected type `&[u8]`\n found type `&'static str`\n\nIf you want more information on this error, try using \"rustc --explain E0308\"\n"
"rendered": "error[E0308]: mismatched types\n --> ./tests/everything/str-lit-type-mismatch.rs:13:20\n |\n13 | let x: &[u8] = \"foo\"; //~ ERROR mismatched types\n | ^^^^^\n | |\n | expected slice, found str\n | help: consider adding a leading `b`: `b\"foo\"`\n |\n = note: expected type `&[u8]`\n found type `&'static str`\n\nIf you want more information on this error, try using \"rustc --explain E0308\"\n"
}
{
"message": "mismatched types",
Expand All @@ -77,7 +77,7 @@
"level": "error",
"spans": [
{
"file_name": "./tests/fixtures/str-lit-type-mismatch.rs",
"file_name": "./tests/everything/str-lit-type-mismatch.rs",
"byte_start": 555,
"byte_end": 561,
"line_start": 14,
Expand Down Expand Up @@ -112,7 +112,7 @@
"level": "help",
"spans": [
{
"file_name": "./tests/fixtures/str-lit-type-mismatch.rs",
"file_name": "./tests/everything/str-lit-type-mismatch.rs",
"byte_start": 555,
"byte_end": 561,
"line_start": 14,
Expand All @@ -136,7 +136,7 @@
"rendered": null
}
],
"rendered": "error[E0308]: mismatched types\n --> ./tests/fixtures/str-lit-type-mismatch.rs:14:23\n |\n14 | let y: &[u8; 4] = \"baaa\"; //~ ERROR mismatched types\n | ^^^^^^\n | |\n | expected array of 4 elements, found str\n | help: consider adding a leading `b`: `b\"baaa\"`\n |\n = note: expected type `&[u8; 4]`\n found type `&'static str`\n\nIf you want more information on this error, try using \"rustc --explain E0308\"\n"
"rendered": "error[E0308]: mismatched types\n --> ./tests/everything/str-lit-type-mismatch.rs:14:23\n |\n14 | let y: &[u8; 4] = \"baaa\"; //~ ERROR mismatched types\n | ^^^^^^\n | |\n | expected array of 4 elements, found str\n | help: consider adding a leading `b`: `b\"baaa\"`\n |\n = note: expected type `&[u8; 4]`\n found type `&'static str`\n\nIf you want more information on this error, try using \"rustc --explain E0308\"\n"
}
{
"message": "mismatched types",
Expand All @@ -147,7 +147,7 @@
"level": "error",
"spans": [
{
"file_name": "./tests/fixtures/str-lit-type-mismatch.rs",
"file_name": "./tests/everything/str-lit-type-mismatch.rs",
"byte_start": 608,
"byte_end": 614,
"line_start": 15,
Expand Down Expand Up @@ -182,7 +182,7 @@
"level": "help",
"spans": [
{
"file_name": "./tests/fixtures/str-lit-type-mismatch.rs",
"file_name": "./tests/everything/str-lit-type-mismatch.rs",
"byte_start": 608,
"byte_end": 614,
"line_start": 15,
Expand All @@ -206,7 +206,7 @@
"rendered": null
}
],
"rendered": "error[E0308]: mismatched types\n --> ./tests/fixtures/str-lit-type-mismatch.rs:15:19\n |\n15 | let z: &str = b\"foo\"; //~ ERROR mismatched types\n | ^^^^^^\n | |\n | expected str, found array of 3 elements\n | help: consider removing the leading `b`: `\"foo\"`\n |\n = note: expected type `&str`\n found type `&'static [u8; 3]`\n\nIf you want more information on this error, try using \"rustc --explain E0308\"\n"
"rendered": "error[E0308]: mismatched types\n --> ./tests/everything/str-lit-type-mismatch.rs:15:19\n |\n15 | let z: &str = b\"foo\"; //~ ERROR mismatched types\n | ^^^^^^\n | |\n | expected str, found array of 3 elements\n | help: consider removing the leading `b`: `\"foo\"`\n |\n = note: expected type `&str`\n found type `&'static [u8; 3]`\n\nIf you want more information on this error, try using \"rustc --explain E0308\"\n"
}
{
"message": "aborting due to 3 previous errors",
Expand Down
Loading