]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/suggest-blanket-impl-local-trait.stderr
Merge commit 'c19edfd71a1d0ddef86c2c67fdb40718d40a72b4' into sync_cg_clif-2022-07-25
[rust.git] / src / test / ui / suggestions / suggest-blanket-impl-local-trait.stderr
1 error[E0782]: trait objects must include the `dyn` keyword
2   --> $DIR/suggest-blanket-impl-local-trait.rs:13:24
3    |
4 LL | impl LocalTraitTwo for LocalTraitOne {}
5    |                        ^^^^^^^^^^^^^
6    |
7 help: add `dyn` keyword before this trait
8    |
9 LL - impl LocalTraitTwo for LocalTraitOne {}
10 LL + impl LocalTraitTwo for dyn LocalTraitOne {}
11    |
12 help: alternatively use a blanket implementation to implement `LocalTraitTwo` for all types that also implement `LocalTraitOne`
13    |
14 LL | impl<T: LocalTraitOne> LocalTraitTwo for T {}
15    |     ++++++++++++++++++                   ~
16
17 error[E0782]: trait objects must include the `dyn` keyword
18   --> $DIR/suggest-blanket-impl-local-trait.rs:18:23
19    |
20 LL | impl fmt::Display for LocalTraitOne {
21    |                       ^^^^^^^^^^^^^
22    |
23 help: add `dyn` keyword before this trait
24    |
25 LL - impl fmt::Display for LocalTraitOne {
26 LL + impl fmt::Display for dyn LocalTraitOne {
27    |
28
29 error[E0782]: trait objects must include the `dyn` keyword
30   --> $DIR/suggest-blanket-impl-local-trait.rs:26:23
31    |
32 LL | impl fmt::Display for LocalTraitTwo + Send {
33    |                       ^^^^^^^^^^^^^^^^^^^^
34    |
35 help: add `dyn` keyword before this trait
36    |
37 LL - impl fmt::Display for LocalTraitTwo + Send {
38 LL + impl fmt::Display for dyn LocalTraitTwo + Send {
39    |
40
41 error[E0782]: trait objects must include the `dyn` keyword
42   --> $DIR/suggest-blanket-impl-local-trait.rs:34:24
43    |
44 LL | impl LocalTraitOne for fmt::Display {}
45    |                        ^^^^^^^^^^^^
46    |
47 help: add `dyn` keyword before this trait
48    |
49 LL - impl LocalTraitOne for fmt::Display {}
50 LL + impl LocalTraitOne for dyn fmt::Display {}
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    |     +++++++++++++++++                   ~
56
57 error[E0782]: trait objects must include the `dyn` keyword
58   --> $DIR/suggest-blanket-impl-local-trait.rs:40:24
59    |
60 LL | impl LocalTraitOne for fmt::Display + Send {}
61    |                        ^^^^^^^^^^^^^^^^^^^
62    |
63 help: add `dyn` keyword before this trait
64    |
65 LL - impl LocalTraitOne for fmt::Display + Send {}
66 LL + impl LocalTraitOne for dyn fmt::Display + Send {}
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    |     ++++++++++++++++++++++++                   ~
72
73 error[E0782]: trait objects must include the `dyn` keyword
74   --> $DIR/suggest-blanket-impl-local-trait.rs:46:29
75    |
76 LL | impl<E> GenericTrait<E> for LocalTraitOne {}
77    |                             ^^^^^^^^^^^^^
78    |
79 help: add `dyn` keyword before this trait
80    |
81 LL - impl<E> GenericTrait<E> for LocalTraitOne {}
82 LL + impl<E> GenericTrait<E> for dyn LocalTraitOne {}
83    |
84 help: alternatively use a blanket implementation to implement `GenericTrait<E>` for all types that also implement `LocalTraitOne`
85    |
86 LL | impl<E, T: LocalTraitOne> GenericTrait<E> for T {}
87    |       ++++++++++++++++++                      ~
88
89 error[E0782]: trait objects must include the `dyn` keyword
90   --> $DIR/suggest-blanket-impl-local-trait.rs:53:35
91    |
92 LL | impl<T, E> GenericTraitTwo<E> for GenericTrait<T> {}
93    |                                   ^^^^^^^^^^^^^^^
94    |
95 help: add `dyn` keyword before this trait
96    |
97 LL - impl<T, E> GenericTraitTwo<E> for GenericTrait<T> {}
98 LL + impl<T, E> GenericTraitTwo<E> for dyn GenericTrait<T> {}
99    |
100 help: alternatively use a blanket implementation to implement `GenericTraitTwo<E>` for all types that also implement `GenericTrait<T>`
101    |
102 LL | impl<T, E, U: GenericTrait<T>> GenericTraitTwo<E> for U {}
103    |          ++++++++++++++++++++                         ~
104
105 error: aborting due to 7 previous errors
106
107 For more information about this error, try `rustc --explain E0782`.