]> git.lizzy.rs Git - rust.git/blob - src/test/ui/union/union-derive.rs
Merge commit '6ed6f1e6a1a8f414ba7e6d9b8222e7e5a1686e42' into clippyup
[rust.git] / src / test / ui / union / union-derive.rs
1 // Most traits cannot be derived for unions.
2
3 #[derive(
4     PartialEq, //~ ERROR this trait cannot be derived for unions
5     PartialOrd, //~ ERROR this trait cannot be derived for unions
6     Ord, //~ ERROR this trait cannot be derived for unions
7     Hash, //~ ERROR this trait cannot be derived for unions
8     Default, //~ ERROR this trait cannot be derived for unions
9     Debug, //~ ERROR this trait cannot be derived for unions
10 )]
11 union U {
12     a: u8,
13     b: u16,
14 }
15
16 fn main() {}