]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.stderr
Rollup merge of #105795 - nicholasbishop:bishop-stabilize-efiapi, r=joshtriplett
[rust.git] / tests / ui / suggestions / suggest-swapping-self-ty-and-trait-edition-2021.stderr
1 error[E0404]: expected trait, found struct `Struct`
2   --> $DIR/suggest-swapping-self-ty-and-trait-edition-2021.rs:12:13
3    |
4 LL | impl<'a, T> Struct<T> for Trait<'a, T> {}
5    |             ^^^^^^^^^ not a trait
6    |
7 help: `impl` items mention the trait being implemented first and the type it is being implemented for second
8    |
9 LL | impl<'a, T> Trait<'a, T> for Struct<T> {}
10    |             ~~~~~~~~~~~~     ~~~~~~~~~
11
12 error[E0404]: expected trait, found enum `Enum`
13   --> $DIR/suggest-swapping-self-ty-and-trait-edition-2021.rs:16:13
14    |
15 LL | impl<'a, T> Enum<T> for Trait<'a, T> {}
16    |             ^^^^^^^ not a trait
17    |
18 help: `impl` items mention the trait being implemented first and the type it is being implemented for second
19    |
20 LL | impl<'a, T> Trait<'a, T> for Enum<T> {}
21    |             ~~~~~~~~~~~~     ~~~~~~~
22
23 error[E0404]: expected trait, found union `Union`
24   --> $DIR/suggest-swapping-self-ty-and-trait-edition-2021.rs:19:13
25    |
26 LL | impl<'a, T> Union<T> for Trait<'a, T> {}
27    |             ^^^^^^^^ not a trait
28    |
29 help: `impl` items mention the trait being implemented first and the type it is being implemented for second
30    |
31 LL | impl<'a, T> Trait<'a, T> for Union<T> {}
32    |             ~~~~~~~~~~~~     ~~~~~~~~
33
34 error[E0782]: trait objects must include the `dyn` keyword
35   --> $DIR/suggest-swapping-self-ty-and-trait-edition-2021.rs:12:27
36    |
37 LL | impl<'a, T> Struct<T> for Trait<'a, T> {}
38    |                           ^^^^^^^^^^^^
39    |
40 help: add `dyn` keyword before this trait
41    |
42 LL | impl<'a, T> Struct<T> for dyn Trait<'a, T> {}
43    |                           +++
44
45 error: aborting due to 4 previous errors
46
47 Some errors have detailed explanations: E0404, E0782.
48 For more information about an error, try `rustc --explain E0404`.