]> git.proxmox.com Git - rustc.git/blame - src/test/ui/nll/type-alias-free-regions.base.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / nll / type-alias-free-regions.base.stderr
CommitLineData
48663c56 1error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
04454e1e 2 --> $DIR/type-alias-free-regions.rs:21:9
0bf4aa26 3 |
532ac7d7 4LL | C { f: b }
48663c56
XL
5 | ^
6 |
c295e0f8 7note: first, the lifetime cannot outlive the anonymous lifetime defined here...
04454e1e 8 --> $DIR/type-alias-free-regions.rs:20:24
48663c56 9 |
3dfed10e 10LL | fn from_box(b: Box<B>) -> Self {
6a06907d 11 | ^
60c5eb7d 12note: ...so that the expression is assignable
04454e1e 13 --> $DIR/type-alias-free-regions.rs:21:16
60c5eb7d
XL
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...
04454e1e 20 --> $DIR/type-alias-free-regions.rs:19:6
48663c56
XL
21 |
22LL | impl<'a> FromBox<'a> for C<'a> {
23 | ^^
c295e0f8 24note: ...so that the types are compatible
04454e1e 25 --> $DIR/type-alias-free-regions.rs:21:9
60c5eb7d
XL
26 |
27LL | C { f: b }
28 | ^^^^^^^^^^
f9f354fc
XL
29 = note: expected `C<'a>`
30 found `C<'_>`
0bf4aa26 31
48663c56 32error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
04454e1e 33 --> $DIR/type-alias-free-regions.rs:31: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...
04454e1e 39 --> $DIR/type-alias-free-regions.rs:30:23
48663c56 40 |
3dfed10e 41LL | fn from_tuple(b: (B,)) -> Self {
6a06907d 42 | ^
60c5eb7d 43note: ...so that the expression is assignable
04454e1e 44 --> $DIR/type-alias-free-regions.rs:31:25
60c5eb7d
XL
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...
04454e1e 51 --> $DIR/type-alias-free-regions.rs:29:6
48663c56
XL
52 |
53LL | impl<'a> FromTuple<'a> for C<'a> {
54 | ^^
c295e0f8 55note: ...so that the types are compatible
04454e1e 56 --> $DIR/type-alias-free-regions.rs:31:9
60c5eb7d
XL
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`.