2025-09-01 22:03:21 +02:00
|
|
|
error[E0792]: expected generic type parameter, found `impl Foo`
|
2025-09-15 14:39:01 +02:00
|
|
|
--> $DIR/double-wrap-with-defining-use.rs:11:26
|
2025-09-01 22:03:21 +02:00
|
|
|
|
|
|
|
|
|
LL | fn a<T: Foo>(x: T) -> impl Foo {
|
|
|
|
|
| - this generic parameter must be used with a generic type parameter
|
|
|
|
|
LL | if true { x } else { a(a(x)) }
|
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
|
2025-09-15 14:39:01 +02:00
|
|
|
--> $DIR/double-wrap-with-defining-use.rs:11:26
|
2025-09-01 22:03:21 +02:00
|
|
|
|
|
|
|
|
|
LL | if true { x } else { a(a(x)) }
|
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0792`.
|