-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mention intent of From
trait in its docs
#92541
Conversation
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
It seems the wording is pre-existing, but I thought operations like this are usually referred to as "total", not "perfect"? |
I've heard of "total" in the context of the mathematical terms for total ordering and such, but I have never heard it in this context (though not to say that's wrong). The point is that this is meant to be non-lossy and infallible, if there's better wording I could make this PR adjust/clarify that too, I simply used the existing wording. |
Yeah, using the existing wording is probably fine. The use of "perfect" just caught my attention since I usually think of "total" as in total functional programming. |
Thanks! @bors r+ rollup |
📌 Commit 9054fbb has been approved by |
Mention intent of `From` trait in its docs This pr is a docs modification to add to the documentation of the `From` trait a note about its intent as a perfect conversion. This is already stated in the `TryFrom` docs so this is simply adding that information in a more visible way.
Mention intent of `From` trait in its docs This pr is a docs modification to add to the documentation of the `From` trait a note about its intent as a perfect conversion. This is already stated in the `TryFrom` docs so this is simply adding that information in a more visible way.
Mention intent of `From` trait in its docs This pr is a docs modification to add to the documentation of the `From` trait a note about its intent as a perfect conversion. This is already stated in the `TryFrom` docs so this is simply adding that information in a more visible way.
…askrgr Rollup of 8 pull requests Successful merges: - rust-lang#91804 (Make some `Clone` impls `const`) - rust-lang#92541 (Mention intent of `From` trait in its docs) - rust-lang#93057 (Add Iterator::collect_into) - rust-lang#94739 (Suggest `if let`/`let_else` for refutable pat in `let`) - rust-lang#94754 (Warn users about `||` in let chain expressions) - rust-lang#94763 (Add documentation about lifetimes to thread::scope.) - rust-lang#94768 (Ignore `close_read_wakes_up` test on SGX platform) - rust-lang#94772 (Add miri to the well known conditional compilation names and values) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This pr is a docs modification to add to the documentation of the
From
trait a note about its intent as a perfect conversion. This is already stated in theTryFrom
docs so this is simply adding that information in a more visible way.