Skip to content

Commit 785d607

Browse files
committed
Reference for pull request.
1 parent 94232f3 commit 785d607

File tree

1 file changed

+49
-5
lines changed

1 file changed

+49
-5
lines changed

tests/ui/from_instead_of_into.stderr

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,77 @@ error: Into trait is preferable than From as a generic bound
22
--> $DIR/from_instead_of_into.rs:11:5
33
|
44
LL | u32: From<T>,
5-
| ^^^^^^^^^^^^ help: try: `T: Into<u32>`
5+
| ^^^^^^^^^^^^
66
|
77
= note: `-D clippy::from-instead-of-into` implied by `-D warnings`
8+
help: remove From bound
9+
|
10+
LL | ,
11+
| --
12+
help: Add this bound predicate
13+
|
14+
LL | u32: From<T>T: Into<u32>,
15+
| ^^^^^^^^^^^^
816

917
error: Into trait is preferable than From as a generic bound
1018
--> $DIR/from_instead_of_into.rs:17:5
1119
|
1220
LL | u32: Copy + Clone + From<T>,
13-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `T: Into<u32>, u32: Copy + Clone`
21+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
22+
|
23+
help: remove From bound
24+
|
25+
LL | u32: Copy + Clone,
26+
| --
27+
help: Add this bound predicate
28+
|
29+
LL | u32: Copy + Clone + From<T>, T: Into<u32>,
30+
| ^^^^^^^^^^^^^^
1431

1532
error: TryInto trait is preferable than TryFrom as a generic bound
1633
--> $DIR/from_instead_of_into.rs:23:5
1734
|
1835
LL | u32: TryFrom<T>,
19-
| ^^^^^^^^^^^^^^^ help: try: `T: TryInto<u32>`
36+
| ^^^^^^^^^^^^^^^
37+
|
38+
help: remove TryFrom bound
39+
|
40+
LL | ,
41+
| --
42+
help: Add this bound predicate
43+
|
44+
LL | u32: TryFrom<T>T: TryInto<u32>,
45+
| ^^^^^^^^^^^^^^^
2046

2147
error: TryInto trait is preferable than TryFrom as a generic bound
2248
--> $DIR/from_instead_of_into.rs:29:5
2349
|
2450
LL | u32: Copy + TryFrom<T> + Clone,
25-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `T: TryInto<u32>, u32: Copy + Clone`
51+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52+
|
53+
help: remove TryFrom bound
54+
|
55+
LL | u32: Copy + Clone,
56+
| --
57+
help: Add this bound predicate
58+
|
59+
LL | u32: Copy + TryFrom<T> + Clone, T: TryInto<u32>,
60+
| ^^^^^^^^^^^^^^^^^
2661

2762
error: TryInto trait is preferable than TryFrom as a generic bound
2863
--> $DIR/from_instead_of_into.rs:35:5
2964
|
3065
LL | u32: TryFrom<T> + Copy + Clone,
31-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `T: TryInto<u32>, u32: Copy + Clone`
66+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67+
|
68+
help: remove TryFrom bound
69+
|
70+
LL | + Copy + Clone,
71+
| --
72+
help: Add this bound predicate
73+
|
74+
LL | u32: TryFrom<T> + Copy + Clone, T: TryInto<u32>,
75+
| ^^^^^^^^^^^^^^^^^
3276

3377
error: aborting due to 5 previous errors
3478

0 commit comments

Comments
 (0)