]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/type-alias-free-regions.stderr
Rollup merge of #105216 - GuillaumeGomez:rm-unused-gui-test, r=notriddle
[rust.git] / src / test / ui / nll / type-alias-free-regions.stderr
1 error: lifetime may not live long enough
2   --> $DIR/type-alias-free-regions.rs:17:9
3    |
4 LL | impl<'a> FromBox<'a> for C<'a> {
5    |      -- lifetime `'a` defined here
6 LL |     fn from_box(b: Box<B>) -> Self {
7    |                 - has type `Box<Box<&'1 isize>>`
8 LL |         C { f: b }
9    |         ^^^^^^^^^^ associated function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
10
11 error: lifetime may not live long enough
12   --> $DIR/type-alias-free-regions.rs:27:9
13    |
14 LL | impl<'a> FromTuple<'a> for C<'a> {
15    |      -- lifetime `'a` defined here
16 LL |     fn from_tuple(b: (B,)) -> Self {
17    |                   - has type `(Box<&'1 isize>,)`
18 LL |         C { f: Box::new(b.0) }
19    |         ^^^^^^^^^^^^^^^^^^^^^^ associated function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
20
21 error: aborting due to 2 previous errors
22