-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #134949 - compiler-errors:froms, r=jieyouxu
Convert some `Into` impls into `From` impls From the [`From`](https://doc.rust-lang.org/std/convert/trait.From.html) docs: > One should always prefer implementing `From` over [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) because implementing `From` automatically provides one with an implementation of [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) thanks to the blanket implementation in the standard library. > > Only implement [`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) when targeting a version prior to Rust 1.41 and converting to a type outside the current crate. `From` was not able to do these types of conversions in earlier versions because of Rust’s orphaning rules. See [Into](https://doc.rust-lang.org/std/convert/trait.Into.html) for more details. Some of these impls are likely from before 1.41, and then some others were probably just mistakes. Building nightly rust is definitely not supported on 1.41, so let's modernize these impls :D
- Loading branch information
Showing
9 changed files
with
45 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters