Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
Closed
@lolbinarycat

Description

@lolbinarycat
Issue body actions

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 toolsArea: 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.Relevant 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

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.