1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // compile-flags:--cfg set1 --cfg set2
17 #[cfg_attr(set1, derive(Debug))]
20 #[cfg_attr(notset, derive(Debug))]
21 struct Notset(NotDebugable);
23 #[cfg_attr(not(notset), derive(Debug))]
26 #[cfg_attr(not(set1), derive(Debug))]
27 struct NotSet1(NotDebugable);
29 #[cfg_attr(all(set1, set2), derive(Debug))]
32 #[cfg_attr(all(set1, notset), derive(Debug))]
33 struct AllSet1Notset(NotDebugable);
35 #[cfg_attr(any(set1, notset), derive(Debug))]
38 #[cfg_attr(any(notset, notset2), derive(Debug))]
39 struct AnyNotsetNotset2(NotDebugable);
41 #[cfg_attr(all(not(notset), any(set1, notset)), derive(Debug))]
44 #[cfg_attr(any(notset, not(any(set1, notset))), derive(Debug))]
45 struct ComplexNot(NotDebugable);
47 #[cfg_attr(any(target_endian = "little", target_endian = "big"), derive(Debug))]
50 fn is_show<T: Debug>() {}
54 is_show::<NotNotset>();
55 is_show::<AllSet1Set2>();
56 is_show::<AnySet1Notset>();
58 is_show::<KeyValue>();