aboutsummaryrefslogtreecommitdiff
path: root/patches/rustdoc.patch
blob: d6ec5918d45fb265734ca03cc10bf820558c147c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff --git a/src/traits.rs b/src/traits.rs
index bd4d070..aae96e5 100644
--- a/src/traits.rs
+++ b/src/traits.rs
@@ -5,7 +5,18 @@ use crate::error::X509Result;
 ///
 /// The returned object uses zero-copy, and so has the same lifetime as the input.
 ///
-/// Note that only parsing is done, not validation (see the [`Validate`](crate::validate::Validate) trait).
+#[cfg_attr(
+    feature = "validate",
+    doc = r#"
+Note that only parsing is done, not validation (see the [`Validate`](crate::validate::Validate) trait).
+"#
+)]
+#[cfg_attr(
+    not(feature = "validate"),
+    doc = r#"
+Note that only parsing is done, not validation.
+"#
+)]
 ///
 /// # Example
 ///