Rollup merge of #56796 - KrishnaSannasi:try_from_impl_change, r=shepmaster
Change bounds on `TryFrom` blanket impl to use `Into` instead of `From` This is from this [comment](https://github.com/rust-lang/rust/issues/33417#issuecomment-447111156) I made. This will expand the impls available for `TryFrom` and `TryInto`, without losing anything in the process.
This commit is contained in:
commit
ebc70e2e9e
3 changed files with 40 additions and 3 deletions
|
|
@ -25,7 +25,7 @@ LL | impl TryFrom<X> for X { //~ ERROR conflicting implementations
|
|||
|
|
||||
= note: conflicting implementation in crate `core`:
|
||||
- impl<T, U> std::convert::TryFrom<U> for T
|
||||
where T: std::convert::From<U>;
|
||||
where U: std::convert::Into<T>;
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue