Skip to content

Make an "I just want to use ?" type for use as a main return type #2367

@scottmcm

Description

@scottmcm

Inspired by rust-lang/rust#49162 (comment)

With ?-in-main about to stabilize, it would be nice to have an "it just works" return type for main so that one can start a bin with fn main() -> InsertSomethingEasyHere { until you care about doing something else.

Edit: Would also be nice for tests, since they never care about the error type, just whether there was one. (cc rust-lang/rust#48854)

Tagging lang in case this needs tweaks to ? to work well with heterogeneous error types.
Tagging libs in case this should be an alias for something like Result<(), Box<Error>> or involve failure in some way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team, which will review and decide on the RFC.T-libs-apiRelevant to the library API team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions