2015-05-29 05:41:26 -05:00
|
|
|
// Enums test
|
|
|
|
|
|
|
|
#[atrr]
|
|
|
|
pub enum Test {
|
|
|
|
A,
|
2015-06-23 08:58:58 -05:00
|
|
|
B(u32, A /* comment */, SomeType),
|
2015-05-29 05:41:26 -05:00
|
|
|
/// Doc comment
|
|
|
|
C,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub enum Foo<'a, Y: Baz>
|
|
|
|
where X: Whatever
|
|
|
|
{
|
|
|
|
A,
|
|
|
|
}
|
|
|
|
|
|
|
|
enum EmtpyWithComment {
|
|
|
|
// Some comment
|
|
|
|
}
|
|
|
|
|
|
|
|
// C-style enum
|
|
|
|
enum Bar {
|
|
|
|
A = 1,
|
|
|
|
#[someAttr(test)]
|
|
|
|
B = 2, // comment
|
|
|
|
C,
|
|
|
|
}
|
|
|
|
|
|
|
|
enum LongVariants {
|
2015-06-23 08:58:58 -05:00
|
|
|
First(LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG, // comment
|
2015-05-29 05:41:26 -05:00
|
|
|
VARIANT),
|
|
|
|
// This is the second variant
|
|
|
|
Second,
|
|
|
|
}
|
2015-06-23 08:58:58 -05:00
|
|
|
|
|
|
|
enum StructLikeVariants {
|
|
|
|
Normal(u32, String),
|
|
|
|
StructLike {
|
|
|
|
x: i32, // Test comment
|
|
|
|
// Pre-comment
|
|
|
|
#[Attr50]
|
|
|
|
y: SomeType, // Aanother Comment
|
2015-07-01 13:49:45 -05:00
|
|
|
},
|
|
|
|
SL {
|
|
|
|
a: A,
|
|
|
|
},
|
2015-06-23 08:58:58 -05:00
|
|
|
}
|