Joel Galenson | a1302f7 | 2021-08-17 09:12:34 -0700 | [diff] [blame] | 1 | diff --git a/src/traits.rs b/src/traits.rs |
| 2 | index 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 | /// |