]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-74684-1.stderr
Rollup merge of #102954 - GuillaumeGomez:cfg-hide-attr-checks, r=Manishearth
[rust.git] / src / test / 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 LL |     let _x = T::identity(&a);
8    |              ------------^^-
9    |              |           |
10    |              |           borrowed value does not live long enough
11    |              argument requires that `a` is borrowed for `'a`
12 ...
13 LL | }
14    | - `a` dropped here while still borrowed
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0597`.