]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-74684-1.stderr
Rollup merge of #82308 - estebank:issue-82290, r=lcnr
[rust.git] / src / test / ui / generic-associated-types / issue-74684-1.stderr
1 warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
2   --> $DIR/issue-74684-1.rs:1:12
3    |
4 LL | #![feature(generic_associated_types)]
5    |            ^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `#[warn(incomplete_features)]` on by default
8    = note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
9
10 error[E0597]: `a` does not live long enough
11   --> $DIR/issue-74684-1.rs:16:26
12    |
13 LL | fn bug<'a, T: ?Sized + Fun<F<'a> = [u8]>>(_ : Box<T>) -> &'static T::F<'a> {
14    |        -- lifetime `'a` defined here
15 LL |     let a = [0; 1];
16 LL |     let _x = T::identity(&a);
17    |              ------------^^-
18    |              |           |
19    |              |           borrowed value does not live long enough
20    |              argument requires that `a` is borrowed for `'a`
21 ...
22 LL | }
23    | - `a` dropped here while still borrowed
24
25 error: aborting due to previous error; 1 warning emitted
26
27 For more information about this error, try `rustc --explain E0597`.