mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-05 21:24:12 +00:00
21 lines
328 B
Rust
21 lines
328 B
Rust
|
pub mod config {
|
||
|
pub trait ConfigType: Sized {
|
||
|
fn doc_hint() -> String;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#[allow(dead_code)]
|
||
|
#[allow(unused_imports)]
|
||
|
mod tests {
|
||
|
use config_proc_macro::config_type;
|
||
|
|
||
|
#[config_type]
|
||
|
enum Bar {
|
||
|
Foo,
|
||
|
Bar,
|
||
|
#[doc_hint = "foo_bar"]
|
||
|
FooBar,
|
||
|
FooFoo(i32),
|
||
|
}
|
||
|
}
|