]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/issue-74684-1.stderr
Modify existing bounds if they exist
[rust.git] / tests / ui / generic-associated-types / issue-74684-1.stderr
1 error[E0597]: `a` does not live long enough
2   --> $DIR/issue-74684-1.rs:13:26
3    |
4 LL | fn bug<'a, T: ?Sized + Fun<F<'a> = [u8]>>(_ : Box<T>) -> &'static T::F<'a> {
5    |        -- lifetime `'a` defined here
6 LL |     let a = [0; 1];
7    |         - binding `a` declared here
8 LL |     let _x = T::identity(&a);
9    |              ------------^^-
10    |              |           |
11    |              |           borrowed value does not live long enough
12    |              argument requires that `a` is borrowed for `'a`
13 ...
14 LL | }
15    | - `a` dropped here while still borrowed
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0597`.