rust/tests/ui/type-alias-impl-trait/generic_duplicate_lifetime_...

27 lines
750 B
Plaintext

error: non-defining opaque type use in defining scope
--> $DIR/generic_duplicate_lifetime_param.rs:7:26
|
LL | fn one<'a>(t: &'a ()) -> Two<'a, 'a> {
| ^^^^^^^^^^^ generic argument `'a` used twice
|
note: for this opaque type
--> $DIR/generic_duplicate_lifetime_param.rs:5:20
|
LL | type Two<'a, 'b> = impl std::fmt::Debug;
| ^^^^^^^^^^^^^^^^^^^^
error: non-defining opaque type use in defining scope
--> $DIR/generic_duplicate_lifetime_param.rs:9:5
|
LL | t
| ^
|
note: lifetime used multiple times
--> $DIR/generic_duplicate_lifetime_param.rs:5:10
|
LL | type Two<'a, 'b> = impl std::fmt::Debug;
| ^^ ^^
error: aborting due to 2 previous errors