Skip to content

Mention Result<!, E> in addition to Result<T, !> on never docs #48096

Closed
@clarfonthey

Description

@clarfonthey

While the latter is mentioned as a way of saying "this computation will never fail if it returns," the former is a way of saying "this computation will never return unless it fails."

For example, it makes a lot of sense to make Command::exec return Result<!, Error>, even though it currently just returns Error (which can't be changed without breaking stability guarantees). Demonstrating both cases seems like a good idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions