]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/rustfmt/config_proc_macro/tests/smoke.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / rustfmt / config_proc_macro / tests / smoke.rs
diff --git a/src/tools/rustfmt/config_proc_macro/tests/smoke.rs b/src/tools/rustfmt/config_proc_macro/tests/smoke.rs
new file mode 100644 (file)
index 0000000..940a8a0
--- /dev/null
@@ -0,0 +1,20 @@
+pub mod config {
+    pub trait ConfigType: Sized {
+        fn doc_hint() -> String;
+    }
+}
+
+#[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),
+    }
+}