mirror of https://github.com/rust-lang/rust
25 lines
816 B
Plaintext
25 lines
816 B
Plaintext
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`.
|