rust-lang / rust-by-example

Learn Rust with examples (Live code editor included)
https://doc.rust-lang.org/stable/rust-by-example/
Apache License 2.0
7k stars 1.34k forks source link

Add precision on From/Into asymmetry to from_into.md #1855

Closed mckzm closed 4 months ago

mckzm commented 4 months ago

Adding a cautionary note to the effect that whilst implementing From for a type will provide it w/ Into, it doesn't work the other way around: implementing Into will not give you From.

rustbot commented 4 months ago

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @marioidival (or someone else) some time within the next two weeks.