Skip to content

Commit

Permalink
Reference for pull request.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongmao86 committed Feb 24, 2021
1 parent 94232f3 commit 785d607
Showing 1 changed file with 49 additions and 5 deletions.
54 changes: 49 additions & 5 deletions tests/ui/from_instead_of_into.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,77 @@ error: Into trait is preferable than From as a generic bound
--> $DIR/from_instead_of_into.rs:11:5
|
LL | u32: From<T>,
| ^^^^^^^^^^^^ help: try: `T: Into<u32>`
| ^^^^^^^^^^^^
|
= note: `-D clippy::from-instead-of-into` implied by `-D warnings`
help: remove From bound
|
LL | ,
| --
help: Add this bound predicate
|
LL | u32: From<T>T: Into<u32>,
| ^^^^^^^^^^^^

error: Into trait is preferable than From as a generic bound
--> $DIR/from_instead_of_into.rs:17:5
|
LL | u32: Copy + Clone + From<T>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `T: Into<u32>, u32: Copy + Clone`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: remove From bound
|
LL | u32: Copy + Clone,
| --
help: Add this bound predicate
|
LL | u32: Copy + Clone + From<T>, T: Into<u32>,
| ^^^^^^^^^^^^^^

error: TryInto trait is preferable than TryFrom as a generic bound
--> $DIR/from_instead_of_into.rs:23:5
|
LL | u32: TryFrom<T>,
| ^^^^^^^^^^^^^^^ help: try: `T: TryInto<u32>`
| ^^^^^^^^^^^^^^^
|
help: remove TryFrom bound
|
LL | ,
| --
help: Add this bound predicate
|
LL | u32: TryFrom<T>T: TryInto<u32>,
| ^^^^^^^^^^^^^^^

error: TryInto trait is preferable than TryFrom as a generic bound
--> $DIR/from_instead_of_into.rs:29:5
|
LL | u32: Copy + TryFrom<T> + Clone,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `T: TryInto<u32>, u32: Copy + Clone`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: remove TryFrom bound
|
LL | u32: Copy + Clone,
| --
help: Add this bound predicate
|
LL | u32: Copy + TryFrom<T> + Clone, T: TryInto<u32>,
| ^^^^^^^^^^^^^^^^^

error: TryInto trait is preferable than TryFrom as a generic bound
--> $DIR/from_instead_of_into.rs:35:5
|
LL | u32: TryFrom<T> + Copy + Clone,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `T: TryInto<u32>, u32: Copy + Clone`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: remove TryFrom bound
|
LL | + Copy + Clone,
| --
help: Add this bound predicate
|
LL | u32: TryFrom<T> + Copy + Clone, T: TryInto<u32>,
| ^^^^^^^^^^^^^^^^^

error: aborting due to 5 previous errors

0 comments on commit 785d607

Please sign in to comment.