Improve overall quality of compile_error! errors

Also updates UI tests.
This commit is contained in:
hcpl
2018-11-29 08:01:17 +02:00
parent 8f3f073017
commit 034db9f20f
69 changed files with 714 additions and 429 deletions
@@ -1,8 +1,8 @@
error: #[serde(tag = "...")] cannot be used with tuple variants
--> $DIR/internal-tuple-variant.rs:4:10
--> $DIR/internal-tuple-variant.rs:7:5
|
4 | #[derive(Serialize)]
| ^^^^^^^^^
7 | Tuple(u8, u8),
| ^^^^^^^^^^^^^
error: aborting due to previous error
@@ -1,8 +1,8 @@
error: #[serde(tag = "...")] can only be used on enums
--> $DIR/internally-tagged-struct.rs:4:10
--> $DIR/internally-tagged-struct.rs:6:1
|
4 | #[derive(Serialize)]
| ^^^^^^^^^
6 | struct S;
| ^^^^^^
error: aborting due to previous error
@@ -1,8 +1,14 @@
error: enum cannot be both untagged and internally tagged
--> $DIR/untagged-and-internal.rs:4:10
--> $DIR/untagged-and-internal.rs:5:9
|
4 | #[derive(Serialize)]
| ^^^^^^^^^
5 | #[serde(untagged)]
| ^^^^^^^^
error: aborting due to previous error
error: enum cannot be both untagged and internally tagged
--> $DIR/untagged-and-internal.rs:6:9
|
6 | #[serde(tag = "type")]
| ^^^
error: aborting due to 2 previous errors
@@ -1,8 +1,8 @@
error: #[serde(untagged)] can only be used on enums
--> $DIR/untagged-struct.rs:4:10
--> $DIR/untagged-struct.rs:6:1
|
4 | #[derive(Serialize)]
| ^^^^^^^^^
6 | struct S;
| ^^^^^^
error: aborting due to previous error