mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 21:48:02 +00:00
Improve UI test coverage
With this commit I believe I've covered all `compile_error!`-based errors.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
union Union {
|
||||
x: u8,
|
||||
y: (),
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
@@ -0,0 +1,11 @@
|
||||
error: Serde does not support derive for unions
|
||||
--> $DIR/union_de.rs:5:1
|
||||
|
|
||||
5 | / union Union {
|
||||
6 | | x: u8,
|
||||
7 | | y: (),
|
||||
8 | | }
|
||||
| |_^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
union Union {
|
||||
x: u8,
|
||||
y: (),
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
@@ -0,0 +1,11 @@
|
||||
error: Serde does not support derive for unions
|
||||
--> $DIR/union_ser.rs:5:1
|
||||
|
|
||||
5 | / union Union {
|
||||
6 | | x: u8,
|
||||
7 | | y: (),
|
||||
8 | | }
|
||||
| |_^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Reference in New Issue
Block a user