]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/type-alias-free-regions.stderr
Rollup merge of #83807 - sjakobi:77548-remove-ignore-annotations, r=Mark-Simulacrum
[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 defined on the method body at 16:24...
8   --> $DIR/type-alias-free-regions.rs:16:24
9    |
10 LL |     fn from_box(b: Box<B>) -> Self {
11    |                        ^
12 note: ...so that the expression is assignable
13   --> $DIR/type-alias-free-regions.rs:17:16
14    |
15 LL |         C { f: b }
16    |                ^
17    = note: expected `Box<Box<&isize>>`
18               found `Box<Box<&isize>>`
19 note: but, the lifetime must be valid for the lifetime `'a` as defined on the impl at 15:6...
20   --> $DIR/type-alias-free-regions.rs:15:6
21    |
22 LL | impl<'a> FromBox<'a> for C<'a> {
23    |      ^^
24 note: ...so that the expression is assignable
25   --> $DIR/type-alias-free-regions.rs:17:9
26    |
27 LL |         C { f: b }
28    |         ^^^^^^^^^^
29    = note: expected `C<'a>`
30               found `C<'_>`
31
32 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
33   --> $DIR/type-alias-free-regions.rs:27:16
34    |
35 LL |         C { f: Box::new(b.0) }
36    |                ^^^^^^^^^^^^^
37    |
38 note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 26:23...
39   --> $DIR/type-alias-free-regions.rs:26:23
40    |
41 LL |     fn from_tuple(b: (B,)) -> Self {
42    |                       ^
43 note: ...so that the expression is assignable
44   --> $DIR/type-alias-free-regions.rs:27:25
45    |
46 LL |         C { f: Box::new(b.0) }
47    |                         ^^^
48    = note: expected `Box<&isize>`
49               found `Box<&isize>`
50 note: but, the lifetime must be valid for the lifetime `'a` as defined on the impl at 25:6...
51   --> $DIR/type-alias-free-regions.rs:25:6
52    |
53 LL | impl<'a> FromTuple<'a> for C<'a> {
54    |      ^^
55 note: ...so that the expression is assignable
56   --> $DIR/type-alias-free-regions.rs:27:9
57    |
58 LL |         C { f: Box::new(b.0) }
59    |         ^^^^^^^^^^^^^^^^^^^^^^
60    = note: expected `C<'a>`
61               found `C<'_>`
62
63 error: aborting due to 2 previous errors
64
65 For more information about this error, try `rustc --explain E0495`.