Skip to content

Rust Doc accidentally elides lifetimes #36067

@CryZe

Description

@CryZe

For some reason the lifetime 'a is missing in the docs for std::slice::from_raw_parts and it's probably missing in more places. It shows that it's returning a &'a [T] but the lifetime is completely missing from the rest of the function signature even though it's clearly there in the source code.

std::slice::from_raw_parts

Signature in Source Code:

pub unsafe fn from_raw_parts<'a, T>(p: *const T, len: usize) -> &'a [T]

Documentation:

pub unsafe fn from_raw_parts<T>(p: *const T, len: usize) -> &'a [T]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions