Skip to content

TryFrom and TryInto docs don't say that TryInto should be preferred in bounds. #140761

Closed
@lolbinarycat

Description

@lolbinarycat

Location

https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html
https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html

Summary

both Into and From say that Into should be preferred in bounds and From should be preferred when implementing.

only the part about preferring TryFrom appears in the docs mentioned above.

this has led to some usages of TryFrom in bounds, such as in ureq::get.

Metadata

Metadata

Assignees

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions