]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.stderr
59ce93fa78b6b3754c151c15dc393c84fe9fe16e
[rust.git] / src / test / ui / impl-trait / multiple-lifetimes / ordinary-bounds-unsuited.stderr
1 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2   --> $DIR/ordinary-bounds-unsuited.rs:20:62
3    |
4 LL | fn upper_bounds<'a, 'b>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'a, 'b>
5    |                                                              ^^^^^^^^^^^^^^^^^^
6    |
7 note: hidden type `Ordinary<'_>` captures the scope of call-site for function at 22:1
8   --> $DIR/ordinary-bounds-unsuited.rs:22:1
9    |
10 LL | / {
11 LL | |     // We return a value:
12 LL | |     //
13 LL | |     // ```
14 ...  |
15 LL | |     if condition() { a } else { b }
16 LL | | }
17    | |_^
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0700`.