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