You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
jieyouxu
added
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
May 14, 2025
hkBst
added a commit
to hkBst/rust
that referenced
this issue
May 16, 2025
std: explain prefer `TryInto` over `TryFrom` when specifying traits bounds on generic function
Fixesrust-lang#140761
This PR keeps the explanations of `Into` and `From` consistent and adds explanations for `TryInto` and `TryFrom`.
r? libs
Rollup merge of rust-lang#140791 - xizheyin:issue-140761, r=ibraheemdev
std: explain prefer `TryInto` over `TryFrom` when specifying traits bounds on generic function
Fixesrust-lang#140761
This PR keeps the explanations of `Into` and `From` consistent and adds explanations for `TryInto` and `TryFrom`.
r? libs
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.
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
andFrom
say thatInto
should be preferred in bounds andFrom
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 inureq::get
.The text was updated successfully, but these errors were encountered: