]> git.proxmox.com Git - rustc.git/blame - src/test/ui/nll/type-alias-free-regions.stderr
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / nll / type-alias-free-regions.stderr
CommitLineData
48663c56
XL
1error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
2 --> $DIR/type-alias-free-regions.rs:17:9
0bf4aa26 3 |
532ac7d7 4LL | C { f: b }
48663c56
XL
5 | ^
6 |
c295e0f8 7note: first, the lifetime cannot outlive the anonymous lifetime defined here...
6a06907d 8 --> $DIR/type-alias-free-regions.rs:16:24
48663c56 9 |
3dfed10e 10LL | fn from_box(b: Box<B>) -> Self {
6a06907d 11 | ^
60c5eb7d
XL
12note: ...so that the expression is assignable
13 --> $DIR/type-alias-free-regions.rs:17:16
14 |
15LL | C { f: b }
16 | ^
1b1a35ee
XL
17 = note: expected `Box<Box<&isize>>`
18 found `Box<Box<&isize>>`
c295e0f8 19note: but, the lifetime must be valid for the lifetime `'a` as defined here...
48663c56
XL
20 --> $DIR/type-alias-free-regions.rs:15:6
21 |
22LL | impl<'a> FromBox<'a> for C<'a> {
23 | ^^
c295e0f8 24note: ...so that the types are compatible
60c5eb7d
XL
25 --> $DIR/type-alias-free-regions.rs:17:9
26 |
27LL | C { f: b }
28 | ^^^^^^^^^^
f9f354fc
XL
29 = note: expected `C<'a>`
30 found `C<'_>`
0bf4aa26 31
48663c56
XL
32error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
33 --> $DIR/type-alias-free-regions.rs:27:16
0bf4aa26 34 |
532ac7d7 35LL | C { f: Box::new(b.0) }
48663c56
XL
36 | ^^^^^^^^^^^^^
37 |
c295e0f8 38note: first, the lifetime cannot outlive the anonymous lifetime defined here...
6a06907d 39 --> $DIR/type-alias-free-regions.rs:26:23
48663c56 40 |
3dfed10e 41LL | fn from_tuple(b: (B,)) -> Self {
6a06907d 42 | ^
60c5eb7d
XL
43note: ...so that the expression is assignable
44 --> $DIR/type-alias-free-regions.rs:27:25
45 |
46LL | C { f: Box::new(b.0) }
47 | ^^^
1b1a35ee
XL
48 = note: expected `Box<&isize>`
49 found `Box<&isize>`
c295e0f8 50note: but, the lifetime must be valid for the lifetime `'a` as defined here...
48663c56
XL
51 --> $DIR/type-alias-free-regions.rs:25:6
52 |
53LL | impl<'a> FromTuple<'a> for C<'a> {
54 | ^^
c295e0f8 55note: ...so that the types are compatible
60c5eb7d
XL
56 --> $DIR/type-alias-free-regions.rs:27:9
57 |
58LL | C { f: Box::new(b.0) }
59 | ^^^^^^^^^^^^^^^^^^^^^^
f9f354fc
XL
60 = note: expected `C<'a>`
61 found `C<'_>`
0bf4aa26
XL
62
63error: aborting due to 2 previous errors
64
e74abb32 65For more information about this error, try `rustc --explain E0495`.