summaryrefslogtreecommitdiff
path: root/tests/ui/generic-associated-types/issue-88595.stderr
blob: d6caed854599325d773e546918471bf918e0ee1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
error: non-defining opaque type use in defining scope
  --> $DIR/issue-88595.rs:21:5
   |
LL |     fn a(&'a self) -> Self::B<'a> {}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ generic argument `'a` used twice
   |
note: for this opaque type
  --> $DIR/issue-88595.rs:19:18
   |
LL |     type B<'b> = impl Clone;
   |                  ^^^^^^^^^^

error[E0308]: mismatched types
  --> $DIR/issue-88595.rs:21:23
   |
LL |     type B<'b> = impl Clone;
   |                  ---------- the expected opaque type
LL |
LL |     fn a(&'a self) -> Self::B<'a> {}
   |        -              ^^^^^^^^^^^ expected opaque type, found `()`
   |        |
   |        implicitly returns `()` as its body has no tail or `return` expression
   |
   = note: expected opaque type `<C as A<'a>>::B<'a>`
                found unit type `()`
note: this item must have the opaque type in its signature in order to be able to register hidden types
  --> $DIR/issue-88595.rs:21:5
   |
LL |     fn a(&'a self) -> Self::B<'a> {}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.