Skip to content

What is a "perfect" conversion, for the From trait? #100376

Closed as not planned
Closed as not planned
@sunfishcode

Description

@sunfishcode

Location

This wording appears in the documentation for the From trait.

Summary

The From trait has this note:

Note: This trait must not fail. The From trait is intended for perfect conversions. If the conversion can fail or is not perfect, use TryFrom.

It's not clear what "perfect" means here. Is there an established meaning for "perfect"? Does it mean lossless, and/or unambiguous? Or does it mean something else?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions