File: fix-example-compile-errors.patch

package info (click to toggle)
rust-valuable-derive 0.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 124 kB
  • sloc: makefile: 4
file content (20 lines) | stat: -rw-r--r-- 543 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/lib.rs b/src/lib.rs
index 6021cb6..8e072ac 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -9,6 +9,7 @@ use syn::parse_macro_input;
 ///
 /// # Examples
 ///
+#[cfg_attr(feature = "valuable-derive", doc = r##"
 /// ```
 /// use valuable::Valuable;
 ///
@@ -23,6 +24,7 @@ use syn::parse_macro_input;
 ///     Custom(String),
 /// }
 /// ```
+"##)]
 #[proc_macro_derive(Valuable, attributes(valuable))]
 pub fn derive_valuable(input: TokenStream) -> TokenStream {
     let mut input = parse_macro_input!(input as syn::DeriveInput);