mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-10-24 20:55:01 +00:00
Improve UI test coverage
With this commit I believe I've covered all `compile_error!`-based errors.
This commit is contained in:
1 parent
034db9f20f
commit
14a3da9b16
56 files changed
+529
-1
No files matched your search
@@ -0,0 +1,11 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[serde(field_identifier)]
|
||||
enum F {
|
||||
A,
|
||||
B,
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
@@ -0,0 +1,12 @@
|
||||
error: field identifiers cannot be serialized
|
||||
--> $DIR/serialize_field_identifier.rs:5:1
|
||||
|
|
||||
5 | / #[serde(field_identifier)]
|
||||
6 | | enum F {
|
||||
7 | | A,
|
||||
8 | | B,
|
||||
9 | | }
|
||||
| |_^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[serde(variant_identifier)]
|
||||
enum F {
|
||||
A,
|
||||
B,
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
@@ -0,0 +1,12 @@
|
||||
error: variant identifiers cannot be serialized
|
||||
--> $DIR/serialize_variant_identifier.rs:5:1
|
||||
|
|
||||
5 | / #[serde(variant_identifier)]
|
||||
6 | | enum F {
|
||||
7 | | A,
|
||||
8 | | B,
|
||||
9 | | }
|
||||
| |_^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Reference in new issue
Block a user