1 // Make sure that built-in derives don't rely on the user not declaring certain
2 // names to work properly.
6 #![allow(nonstandard_style)]
7 #![feature(decl_macro)]
9 use std::prelude::v1::test as inline;
13 static other: () = ();
14 static state: () = ();
15 static __self_0_0: () = ();
16 static __self_1_0: () = ();
17 static __self_vi: () = ();
18 static __arg_1_0: () = ();
19 static debug_trait_builder: () = ();
24 trait MethodsInDerives: Sized {
25 fn debug_tuple(self) {}
26 fn debug_struct(self) {}
31 fn partial_cmp(self) {}
41 trait GenericAny<T, U> {}
42 impl<S, T, U> GenericAny<T, U> for S {}
44 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
48 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
51 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Hash)]
52 struct X<A: GenericAny<A, self::X<i32>>> {
56 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Hash)]
61 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
67 // Make sure that we aren't using `self::` in paths, since it doesn't work in
69 const NON_MODULE: () = {
70 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
74 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
77 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Hash)]
78 struct X<A: Fn(A) -> self::X<i32>> {
82 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Hash)]
87 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
95 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
99 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
102 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Hash)]
103 struct X<A: GenericAny<A, self::X<i32>>> {
107 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Default, Hash)]
112 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]