]> git.proxmox.com Git - rustc.git/blob - src/test/ui/suggestions/suggest-swapping-self-ty-and-trait.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / suggestions / suggest-swapping-self-ty-and-trait.stderr
1 error[E0404]: expected trait, found struct `Struct`
2 --> $DIR/suggest-swapping-self-ty-and-trait.rs:10: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.rs:15: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.rs:18: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 warning: trait objects without an explicit `dyn` are deprecated
35 --> $DIR/suggest-swapping-self-ty-and-trait.rs:10:27
36 |
37 LL | impl<'a, T> Struct<T> for Trait<'a, T> {}
38 | ^^^^^^^^^^^^
39 |
40 = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
41 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
42 = note: `#[warn(bare_trait_objects)]` on by default
43 help: use `dyn`
44 |
45 LL | impl<'a, T> Struct<T> for dyn Trait<'a, T> {}
46 | +++
47
48 error: aborting due to 3 previous errors; 1 warning emitted
49
50 For more information about this error, try `rustc --explain E0404`.