about summary refs log tree commit diff
path: root/tests/ui/impl-trait/non-defining-uses/double-wrap-with-defining-use.current.stderr
blob: bac5b3e0cf441819aa31be91affe379f10280ac6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
error[E0792]: expected generic type parameter, found `impl Foo`
  --> $DIR/double-wrap-with-defining-use.rs:11:26
   |
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
  --> $DIR/double-wrap-with-defining-use.rs:11:26
   |
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`.