]> git.proxmox.com Git - rustc.git/blame - src/test/ui/regions/regions-creating-enums4.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / regions / regions-creating-enums4.stderr
CommitLineData
b7449926 1error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
0731742a 2 --> $DIR/regions-creating-enums4.rs:7:5
b7449926 3 |
532ac7d7 4LL | Ast::Add(x, y)
b7449926
XL
5 | ^^^^^^^^
6 |
e74abb32 7note: first, the lifetime cannot outlive the lifetime `'a` as defined on the function body at 6:16...
0731742a 8 --> $DIR/regions-creating-enums4.rs:6:16
b7449926 9 |
0731742a 10LL | fn mk_add_bad2<'a,'b>(x: &'a Ast<'a>, y: &'a Ast<'a>, z: &Ast) -> Ast<'b> {
b7449926 11 | ^^
60c5eb7d
XL
12note: ...so that the expression is assignable
13 --> $DIR/regions-creating-enums4.rs:7:14
14 |
15LL | Ast::Add(x, y)
16 | ^
17 = note: expected `&Ast<'_>`
18 found `&Ast<'a>`
e74abb32 19note: but, the lifetime must be valid for the lifetime `'b` as defined on the function body at 6:19...
0731742a 20 --> $DIR/regions-creating-enums4.rs:6:19
b7449926 21 |
0731742a 22LL | fn mk_add_bad2<'a,'b>(x: &'a Ast<'a>, y: &'a Ast<'a>, z: &Ast) -> Ast<'b> {
b7449926 23 | ^^
60c5eb7d
XL
24note: ...so that the expression is assignable
25 --> $DIR/regions-creating-enums4.rs:7:5
26 |
27LL | Ast::Add(x, y)
28 | ^^^^^^^^^^^^^^
29 = note: expected `Ast<'b>`
30 found `Ast<'_>`
b7449926
XL
31
32error: aborting due to previous error
33
e74abb32 34For more information about this error, try `rustc --explain E0495`.