summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/issue-68368-non-defining-use.stderr
blob: ea704ffff97ab187308cc65700bc785d9cf8fb6c (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
error[E0792]: non-defining opaque type use in defining scope
  --> $DIR/issue-68368-non-defining-use.rs:9:15
   |
LL | fn f<'a>() -> Alias<'a, ()> {}
   |               ^^^^^^^^^^^^^ argument `()` is not a generic parameter
   |
note: for this opaque type
  --> $DIR/issue-68368-non-defining-use.rs:7:21
   |
LL | type Alias<'a, U> = impl Trait<U>;
   |                     ^^^^^^^^^^^^^

error[E0792]: expected generic type parameter, found `()`
  --> $DIR/issue-68368-non-defining-use.rs:9:29
   |
LL | type Alias<'a, U> = impl Trait<U>;
   |                - this generic parameter must be used with a generic type parameter
LL |
LL | fn f<'a>() -> Alias<'a, ()> {}
   |                             ^^

error: aborting due to 2 previous errors

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