1 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
2 --> $DIR/type-alias-free-regions.rs:17:9
7 note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 16:5...
8 --> $DIR/type-alias-free-regions.rs:16:5
10 LL | / fn from_box(b: Box<B>) -> Self {
14 = note: ...so that the expression is assignable:
15 expected std::boxed::Box<std::boxed::Box<&isize>>
16 found std::boxed::Box<std::boxed::Box<&isize>>
17 note: but, the lifetime must be valid for the lifetime 'a as defined on the impl at 15:6...
18 --> $DIR/type-alias-free-regions.rs:15:6
20 LL | impl<'a> FromBox<'a> for C<'a> {
22 = note: ...so that the expression is assignable:
26 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
27 --> $DIR/type-alias-free-regions.rs:27:16
29 LL | C { f: Box::new(b.0) }
32 note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 26:5...
33 --> $DIR/type-alias-free-regions.rs:26:5
35 LL | / fn from_tuple(b: (B,)) -> Self {
36 LL | | C { f: Box::new(b.0) }
39 = note: ...so that the expression is assignable:
40 expected std::boxed::Box<&isize>
41 found std::boxed::Box<&isize>
42 note: but, the lifetime must be valid for the lifetime 'a as defined on the impl at 25:6...
43 --> $DIR/type-alias-free-regions.rs:25:6
45 LL | impl<'a> FromTuple<'a> for C<'a> {
47 = note: ...so that the expression is assignable:
51 error: aborting due to 2 previous errors