fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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