]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/negative-reasoning.stderr
Rollup merge of #95504 - jyn514:library-alias, r=Mark-Simulacrum
[rust.git] / src / test / ui / impl-trait / negative-reasoning.stderr
1 error: cannot implement trait on type alias impl trait
2   --> $DIR/negative-reasoning.rs:19:25
3    |
4 LL | impl AnotherTrait for D<OpaqueType> {
5    |                         ^^^^^^^^^^
6    |
7 note: type alias impl trait defined here
8   --> $DIR/negative-reasoning.rs:7:19
9    |
10 LL | type OpaqueType = impl OpaqueTrait;
11    |                   ^^^^^^^^^^^^^^^^
12
13 error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<OpaqueType>`
14   --> $DIR/negative-reasoning.rs:19:1
15    |
16 LL | impl<T: std::fmt::Debug> AnotherTrait for T {}
17    | ------------------------------------------- first implementation here
18 ...
19 LL | impl AnotherTrait for D<OpaqueType> {
20    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<OpaqueType>`
21    |
22    = note: upstream crates may add a new impl of trait `std::fmt::Debug` for type `OpaqueType` in future versions
23
24 error: aborting due to 2 previous errors
25
26 For more information about this error, try `rustc --explain E0119`.