Hi,
Is it possible to print the documentation for TryFrom<u64> for Foo
and From<u64> for Foo
in the example below at the same time?
#[cfg(not(feature = "u64"))]
struct Foo(u32);
#[cfg(feature = "u64")]
struct Foo(u64);
#[cfg(not(feature = "u64"))]
impl TryFrom<u64> for Foo {
type Error = std::num::TryFromIntError;
/// Converts `u64` to [`Foo`].
///
/// # Errors
///
/// Returns [`Err`] if `v` is out of range for [`Foo`].
fn try_from(v: u64) -> Result<Self, Self::Error> {
v.try_into().map(Self)
}
}
#[cfg(feature = "u64")]
impl From<u64> for Foo {
/// Converts `u64` to [`Foo`].
fn from(v: u64) -> Self {
Self(v)
}
}
If possible, I would like to be able to print the documentation for TryFrom<u64> for Foo
even when the all features is enabled.