]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/type-alias-free-regions.stderr
fix merge conflicts
[rust.git] / src / test / ui / nll / type-alias-free-regions.stderr
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
3    |
4 LL |         C { f: b }
5    |         ^
6    |
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
9    |
10 LL | /     fn from_box(b: Box<B>) -> Self {
11 LL | |         C { f: b }
12 LL | |     }
13    | |_____^
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
19    |
20 LL | impl<'a> FromBox<'a> for C<'a> {
21    |      ^^
22    = note: ...so that the expression is assignable:
23            expected C<'a>
24               found C<'_>
25
26 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
27   --> $DIR/type-alias-free-regions.rs:27:16
28    |
29 LL |         C { f: Box::new(b.0) }
30    |                ^^^^^^^^^^^^^
31    |
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
34    |
35 LL | /     fn from_tuple(b: (B,)) -> Self {
36 LL | |         C { f: Box::new(b.0) }
37 LL | |     }
38    | |_____^
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
44    |
45 LL | impl<'a> FromTuple<'a> for C<'a> {
46    |      ^^
47    = note: ...so that the expression is assignable:
48            expected C<'a>
49               found C<'_>
50
51 error: aborting due to 2 previous errors
52