@@ -8,14 +8,14 @@ help: add `dyn` keyword before this trait
8
8
|
9
9
LL - impl LocalTraitTwo for LocalTraitOne {}
10
10
LL + impl LocalTraitTwo for dyn LocalTraitOne {}
11
- |
11
+ |
12
12
help: alternatively use a blanket implementation to implement `LocalTraitTwo` for all types that also implement `LocalTraitOne`
13
13
|
14
14
LL | impl<T: LocalTraitOne> LocalTraitTwo for T {}
15
15
| ++++++++++++++++++ ~
16
16
17
17
error[E0782]: trait objects must include the `dyn` keyword
18
- --> $DIR/suggest-blanket-impl-local-trait.rs:16 :23
18
+ --> $DIR/suggest-blanket-impl-local-trait.rs:18 :23
19
19
|
20
20
LL | impl fmt::Display for LocalTraitOne {
21
21
| ^^^^^^^^^^^^^
@@ -24,10 +24,10 @@ help: add `dyn` keyword before this trait
24
24
|
25
25
LL - impl fmt::Display for LocalTraitOne {
26
26
LL + impl fmt::Display for dyn LocalTraitOne {
27
- |
27
+ |
28
28
29
29
error[E0782]: trait objects must include the `dyn` keyword
30
- --> $DIR/suggest-blanket-impl-local-trait.rs:23 :23
30
+ --> $DIR/suggest-blanket-impl-local-trait.rs:26 :23
31
31
|
32
32
LL | impl fmt::Display for LocalTraitTwo + Send {
33
33
| ^^^^^^^^^^^^^^^^^^^^
@@ -36,10 +36,10 @@ help: add `dyn` keyword before this trait
36
36
|
37
37
LL - impl fmt::Display for LocalTraitTwo + Send {
38
38
LL + impl fmt::Display for dyn LocalTraitTwo + Send {
39
- |
39
+ |
40
40
41
41
error[E0782]: trait objects must include the `dyn` keyword
42
- --> $DIR/suggest-blanket-impl-local-trait.rs:30 :24
42
+ --> $DIR/suggest-blanket-impl-local-trait.rs:34 :24
43
43
|
44
44
LL | impl LocalTraitOne for fmt::Display {}
45
45
| ^^^^^^^^^^^^
@@ -48,10 +48,14 @@ help: add `dyn` keyword before this trait
48
48
|
49
49
LL - impl LocalTraitOne for fmt::Display {}
50
50
LL + impl LocalTraitOne for dyn fmt::Display {}
51
- |
51
+ |
52
+ help: alternatively use a blanket implementation to implement `LocalTraitOne` for all types that also implement `fmt::Display`
53
+ |
54
+ LL | impl<T: fmt::Display> LocalTraitOne for T {}
55
+ | +++++++++++++++++ ~
52
56
53
57
error[E0782]: trait objects must include the `dyn` keyword
54
- --> $DIR/suggest-blanket-impl-local-trait.rs:33 :24
58
+ --> $DIR/suggest-blanket-impl-local-trait.rs:40 :24
55
59
|
56
60
LL | impl LocalTraitOne for fmt::Display + Send {}
57
61
| ^^^^^^^^^^^^^^^^^^^
@@ -60,10 +64,14 @@ help: add `dyn` keyword before this trait
60
64
|
61
65
LL - impl LocalTraitOne for fmt::Display + Send {}
62
66
LL + impl LocalTraitOne for dyn fmt::Display + Send {}
63
- |
67
+ |
68
+ help: alternatively use a blanket implementation to implement `LocalTraitOne` for all types that also implement `fmt::Display + Send`
69
+ |
70
+ LL | impl<T: fmt::Display + Send> LocalTraitOne for T {}
71
+ | ++++++++++++++++++++++++ ~
64
72
65
73
error[E0782]: trait objects must include the `dyn` keyword
66
- --> $DIR/suggest-blanket-impl-local-trait.rs:36 :29
74
+ --> $DIR/suggest-blanket-impl-local-trait.rs:46 :29
67
75
|
68
76
LL | impl<E> GenericTrait<E> for LocalTraitOne {}
69
77
| ^^^^^^^^^^^^^
@@ -72,14 +80,14 @@ help: add `dyn` keyword before this trait
72
80
|
73
81
LL - impl<E> GenericTrait<E> for LocalTraitOne {}
74
82
LL + impl<E> GenericTrait<E> for dyn LocalTraitOne {}
75
- |
83
+ |
76
84
help: alternatively use a blanket implementation to implement `GenericTrait<E>` for all types that also implement `LocalTraitOne`
77
85
|
78
- LL | impl<E, L : LocalTraitOne> GenericTrait<E> for T {}
86
+ LL | impl<E, T : LocalTraitOne> GenericTrait<E> for T {}
79
87
| ++++++++++++++++++ ~
80
88
81
89
error[E0782]: trait objects must include the `dyn` keyword
82
- --> $DIR/suggest-blanket-impl-local-trait.rs:41 :35
90
+ --> $DIR/suggest-blanket-impl-local-trait.rs:53 :35
83
91
|
84
92
LL | impl<T, E> GenericTraitTwo<E> for GenericTrait<T> {}
85
93
| ^^^^^^^^^^^^^^^
@@ -88,10 +96,10 @@ help: add `dyn` keyword before this trait
88
96
|
89
97
LL - impl<T, E> GenericTraitTwo<E> for GenericTrait<T> {}
90
98
LL + impl<T, E> GenericTraitTwo<E> for dyn GenericTrait<T> {}
91
- |
99
+ |
92
100
help: alternatively use a blanket implementation to implement `GenericTraitTwo<E>` for all types that also implement `GenericTrait<T>`
93
101
|
94
- LL | impl<T, E, G : GenericTrait<T>> GenericTraitTwo<E> for U {}
102
+ LL | impl<T, E, U : GenericTrait<T>> GenericTraitTwo<E> for U {}
95
103
| ++++++++++++++++++++ ~
96
104
97
105
error: aborting due to 7 previous errors
0 commit comments