rust/tests/target/configs/merge_derives/true.rs

41 lines
671 B
Rust
Raw Normal View History

2017-08-23 09:20:32 -05:00
// rustfmt-merge_derives: true
// Merge multiple derives to a single one.
#[bar]
2017-08-24 09:46:22 -05:00
#[derive(Eq, PartialEq)]
2017-08-23 09:20:32 -05:00
#[foo]
2017-08-24 09:46:22 -05:00
#[derive(Debug)]
2017-08-23 09:20:32 -05:00
#[foobar]
2017-08-24 09:46:22 -05:00
#[derive(Copy, Clone)]
2017-08-23 09:20:32 -05:00
pub enum Foo {}
2017-08-24 09:46:22 -05:00
#[derive(Eq, PartialEq, Debug)]
#[foobar]
#[derive(Copy, Clone)]
pub enum Bar {}
#[derive(Eq, PartialEq, Debug, Copy, Clone)]
pub enum FooBar {}
mod foo {
#[bar]
#[derive(Eq, PartialEq)]
#[foo]
#[derive(Debug)]
#[foobar]
#[derive(Copy, Clone)]
pub enum Foo {}
}
mod bar {
#[derive(Eq, PartialEq, Debug)]
#[foobar]
#[derive(Copy, Clone)]
pub enum Bar {}
}
mod foobar {
#[derive(Eq, PartialEq, Debug, Copy, Clone)]
pub enum FooBar {}
}