]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.nll.stderr
Change compare mode to use -Zborrowck=mir
[rust.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 error: aborting due to previous error
13