Closed as not planned
Description
I tried this code:
// `cargo +stable doc`
pub struct Buffer<const N: usize>([u8; N]);
impl<'a, const N: usize> TryFrom<&'a [u8]> for Buffer<N> {
type Error = <[u8; N] as TryFrom<&'a [u8]>>::Error;
fn try_from(slice: &'a [u8]) -> Result<Self, Self::Error> {
<[u8; N]>::try_from(slice).map(Self)
}
}
I expected to see this happen: rustdoc can resolve type Error
as std::array::TryFromSliceError
Instead, this happened: rustdoc can't inline type (i.e. it shows type Error = <[u8; N] as TryFrom<&'a [u8]>>::Error
)
Meta
rustc --version --verbose
:
rustc 1.77.2 (25ef9e3d8 2024-04-09)
binary: rustc
commit-hash: 25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04
commit-date: 2024-04-09
host: x86_64-unknown-linux-gnu
release: 1.77.2
LLVM version: 17.0.6