]> git.proxmox.com Git - rustc.git/blob - src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.nll.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / regions / regions-bounded-method-type-parameters-trait-bound.nll.stderr
1 error[E0521]: borrowed data escapes outside of function
2 --> $DIR/regions-bounded-method-type-parameters-trait-bound.rs:20:5
3 |
4 LL | fn caller2<'a,'b,F:Foo<'a>>(a: Inv<'a>, b: Inv<'b>, f: F) {
5 | - - `b` is a reference that is only valid in the function body
6 | |
7 | `a` is declared here, outside of the function body
8 LL | // Here the value provided for 'y is 'b, and hence 'b:'a does not hold.
9 LL | f.method(b);
10 | ^^^^^^^^^^^ `b` escapes the function body here
11 |
12 = help: consider adding the following bound: `'b: 'a`
13
14 error: aborting due to previous error
15