summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/config_proc_macro/tests/smoke.rs
blob: c8a83e39c9efc656d1d411de343a8fdb0aa23cbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
pub mod config {
    pub trait ConfigType: Sized {
        fn doc_hint() -> String;
        fn stable_variant(&self) -> bool;
    }
}

#[allow(dead_code)]
#[allow(unused_imports)]
mod tests {
    use rustfmt_config_proc_macro::config_type;

    #[config_type]
    enum Bar {
        Foo,
        Bar,
        #[doc_hint = "foo_bar"]
        FooBar,
        FooFoo(i32),
    }
}