Ui tests with compile_error resolved at call site

This commit is contained in:
David Tolnay
2023-06-07 20:02:04 -07:00
parent 1aebdc2760
commit e77db40b8d
92 changed files with 467 additions and 0 deletions
@@ -1,11 +1,19 @@
error: #[serde(field_identifier)] and #[serde(variant_identifier)] cannot both be set
--> tests/ui/identifier/both.rs:4:9
|
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | #[serde(field_identifier, variant_identifier)]
| ^^^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
error: #[serde(field_identifier)] and #[serde(variant_identifier)] cannot both be set
--> tests/ui/identifier/both.rs:4:27
|
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | #[serde(field_identifier, variant_identifier)]
| ^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,5 +1,10 @@
error: #[serde(field_identifier)] can only be used on an enum
--> tests/ui/identifier/field_struct.rs:5:1
|
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | #[serde(field_identifier)]
5 | struct S;
| ^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,5 +1,10 @@
error: #[serde(field_identifier)] may only contain unit variants
--> tests/ui/identifier/field_tuple.rs:7:5
|
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
7 | B(u8, u8),
| ^^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,5 +1,10 @@
error: `Other` must be the last variant
--> tests/ui/identifier/newtype_not_last.rs:7:5
|
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
7 | Other(String),
| ^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,6 +1,11 @@
error: #[serde(other)] must be on a unit variant
--> tests/ui/identifier/not_unit.rs:7:5
|
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
7 | / #[serde(other)]
8 | | Other(u8, u8),
| |_________________^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,6 +1,11 @@
error: #[serde(other)] must be on the last variant
--> tests/ui/identifier/other_not_last.rs:7:5
|
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
7 | / #[serde(other)]
8 | | Other,
| |_________^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,6 +1,11 @@
error: #[serde(other)] cannot appear on untagged enum
--> tests/ui/identifier/other_untagged.rs:6:5
|
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
6 | / #[serde(other)]
7 | | Other,
| |_________^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,6 +1,11 @@
error: #[serde(other)] may not be used on a variant identifier
--> tests/ui/identifier/other_variant.rs:6:5
|
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
6 | / #[serde(other)]
7 | | Other,
| |_________^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,5 +1,10 @@
error: #[serde(variant_identifier)] can only be used on an enum
--> tests/ui/identifier/variant_struct.rs:5:1
|
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | #[serde(variant_identifier)]
5 | struct S;
| ^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -1,5 +1,10 @@
error: #[serde(variant_identifier)] may only contain unit variants
--> tests/ui/identifier/variant_tuple.rs:7:5
|
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
7 | B(u8, u8),
| ^^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)