2 // `#[derive(Trait)]` works for empty structs/variants with braces or parens.
4 #![feature(rustc_private)]
6 extern crate rustc_macros;
7 extern crate rustc_serialize;
9 // Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
11 #[allow(unused_extern_crates)]
12 extern crate rustc_driver;
14 use rustc_macros::{Decodable, Encodable};
16 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default, Debug, Encodable, Decodable)]
19 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default, Debug, Encodable, Decodable)]
22 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Encodable, Decodable)]
36 assert_eq!(format!("{:?}", s), "S");
44 assert_eq!(format!("{:?}", z), "Z");
52 assert_eq!(format!("{:?}", e), "V");
60 assert_eq!(format!("{:?}", e), "W");