@@ -8,14 +8,14 @@ help: add `dyn` keyword before this trait
88 |
99LL - impl LocalTraitTwo for LocalTraitOne {}
1010LL + impl LocalTraitTwo for dyn LocalTraitOne {}
11- |
11+ |
1212help: alternatively use a blanket implementation to implement `LocalTraitTwo` for all types that also implement `LocalTraitOne`
1313 |
1414LL | impl<T: LocalTraitOne> LocalTraitTwo for T {}
1515 | ++++++++++++++++++ ~
1616
1717error[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
1919 |
2020LL | impl fmt::Display for LocalTraitOne {
2121 | ^^^^^^^^^^^^^
@@ -24,10 +24,10 @@ help: add `dyn` keyword before this trait
2424 |
2525LL - impl fmt::Display for LocalTraitOne {
2626LL + impl fmt::Display for dyn LocalTraitOne {
27- |
27+ |
2828
2929error[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
3131 |
3232LL | impl fmt::Display for LocalTraitTwo + Send {
3333 | ^^^^^^^^^^^^^^^^^^^^
@@ -36,10 +36,10 @@ help: add `dyn` keyword before this trait
3636 |
3737LL - impl fmt::Display for LocalTraitTwo + Send {
3838LL + impl fmt::Display for dyn LocalTraitTwo + Send {
39- |
39+ |
4040
4141error[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
4343 |
4444LL | impl LocalTraitOne for fmt::Display {}
4545 | ^^^^^^^^^^^^
@@ -48,10 +48,14 @@ help: add `dyn` keyword before this trait
4848 |
4949LL - impl LocalTraitOne for fmt::Display {}
5050LL + 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+ | +++++++++++++++++ ~
5256
5357error[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
5559 |
5660LL | impl LocalTraitOne for fmt::Display + Send {}
5761 | ^^^^^^^^^^^^^^^^^^^
@@ -60,10 +64,14 @@ help: add `dyn` keyword before this trait
6064 |
6165LL - impl LocalTraitOne for fmt::Display + Send {}
6266LL + 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+ | ++++++++++++++++++++++++ ~
6472
6573error[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
6775 |
6876LL | impl<E> GenericTrait<E> for LocalTraitOne {}
6977 | ^^^^^^^^^^^^^
@@ -72,14 +80,14 @@ help: add `dyn` keyword before this trait
7280 |
7381LL - impl<E> GenericTrait<E> for LocalTraitOne {}
7482LL + impl<E> GenericTrait<E> for dyn LocalTraitOne {}
75- |
83+ |
7684help: alternatively use a blanket implementation to implement `GenericTrait<E>` for all types that also implement `LocalTraitOne`
7785 |
78- LL | impl<E, L : LocalTraitOne> GenericTrait<E> for T {}
86+ LL | impl<E, T : LocalTraitOne> GenericTrait<E> for T {}
7987 | ++++++++++++++++++ ~
8088
8189error[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
8391 |
8492LL | impl<T, E> GenericTraitTwo<E> for GenericTrait<T> {}
8593 | ^^^^^^^^^^^^^^^
@@ -88,10 +96,10 @@ help: add `dyn` keyword before this trait
8896 |
8997LL - impl<T, E> GenericTraitTwo<E> for GenericTrait<T> {}
9098LL + impl<T, E> GenericTraitTwo<E> for dyn GenericTrait<T> {}
91- |
99+ |
92100help: alternatively use a blanket implementation to implement `GenericTraitTwo<E>` for all types that also implement `GenericTrait<T>`
93101 |
94- LL | impl<T, E, G : GenericTrait<T>> GenericTraitTwo<E> for U {}
102+ LL | impl<T, E, U : GenericTrait<T>> GenericTraitTwo<E> for U {}
95103 | ++++++++++++++++++++ ~
96104
97105error: aborting due to 7 previous errors
0 commit comments