2019-03-31 04:42:49 -05:00
|
|
|
pub mod config {
|
|
|
|
pub trait ConfigType: Sized {
|
|
|
|
fn doc_hint() -> String;
|
2022-06-10 06:17:29 -05:00
|
|
|
fn stable_variant(&self) -> bool;
|
2019-03-31 04:42:49 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[allow(dead_code)]
|
|
|
|
#[allow(unused_imports)]
|
|
|
|
mod tests {
|
2019-06-29 23:10:16 -05:00
|
|
|
use rustfmt_config_proc_macro::config_type;
|
2019-03-31 04:42:49 -05:00
|
|
|
|
|
|
|
#[config_type]
|
|
|
|
enum Bar {
|
|
|
|
Foo,
|
|
|
|
Bar,
|
|
|
|
#[doc_hint = "foo_bar"]
|
|
|
|
FooBar,
|
|
|
|
FooFoo(i32),
|
|
|
|
}
|
|
|
|
}
|