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 --> $DIR/type-alias-free-regions.rs:17:16
19 = note: expected `std::boxed::Box<std::boxed::Box<&isize>>`
20 found `std::boxed::Box<std::boxed::Box<&isize>>`
21 note: but, the lifetime must be valid for the lifetime `'a` as defined on the impl at 15:6...
22 --> $DIR/type-alias-free-regions.rs:15:6
24 LL | impl<'a> FromBox<'a> for C<'a> {
26 note: ...so that the expression is assignable
27 --> $DIR/type-alias-free-regions.rs:17:9
31 = note: expected `C<'a>`
34 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
35 --> $DIR/type-alias-free-regions.rs:27:16
37 LL | C { f: Box::new(b.0) }
40 note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 26:5...
41 --> $DIR/type-alias-free-regions.rs:26:5
43 LL | / fn from_tuple(b: (B,)) -> Self {
44 LL | | C { f: Box::new(b.0) }
47 note: ...so that the expression is assignable
48 --> $DIR/type-alias-free-regions.rs:27:25
50 LL | C { f: Box::new(b.0) }
52 = note: expected `std::boxed::Box<&isize>`
53 found `std::boxed::Box<&isize>`
54 note: but, the lifetime must be valid for the lifetime `'a` as defined on the impl at 25:6...
55 --> $DIR/type-alias-free-regions.rs:25:6
57 LL | impl<'a> FromTuple<'a> for C<'a> {
59 note: ...so that the expression is assignable
60 --> $DIR/type-alias-free-regions.rs:27:9
62 LL | C { f: Box::new(b.0) }
63 | ^^^^^^^^^^^^^^^^^^^^^^
64 = note: expected `C<'a>`
67 error: aborting due to 2 previous errors
69 For more information about this error, try `rustc --explain E0495`.