]> git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/type-alias-free-regions.stderr
New upstream version 1.61.0+dfsg1
[rustc.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 here...
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 here...
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 types are compatible
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 here...
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 here...
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 types are compatible
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`.