-error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
- --> $DIR/project-fn-ret-invariant.rs:48:4
+error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
+ --> $DIR/project-fn-ret-invariant.rs:49:9
|
-LL | bar(foo, x)
- | ^^^^^^^^^^^
+LL | bar(foo, x)
+ | ^^^
|
-note: first, the lifetime cannot outlive the lifetime `'a` as defined on the function body at 44:8...
- --> $DIR/project-fn-ret-invariant.rs:44:8
+note: first, the lifetime cannot outlive the lifetime `'a` as defined on the function body at 45:8...
+ --> $DIR/project-fn-ret-invariant.rs:45:8
|
-LL | fn baz<'a,'b>(x: Type<'a>) -> Type<'static> {
+LL | fn baz<'a, 'b>(x: Type<'a>) -> Type<'static> {
| ^^
note: ...so that the expression is assignable
- --> $DIR/project-fn-ret-invariant.rs:48:13
+ --> $DIR/project-fn-ret-invariant.rs:49:14
|
-LL | bar(foo, x)
- | ^
+LL | bar(foo, x)
+ | ^
= note: expected `Type<'_>`
found `Type<'a>`
= note: but, the lifetime must be valid for the static lifetime...
note: ...so that the expression is assignable
- --> $DIR/project-fn-ret-invariant.rs:48:4
+ --> $DIR/project-fn-ret-invariant.rs:49:5
|
-LL | bar(foo, x)
- | ^^^^^^^^^^^
+LL | bar(foo, x)
+ | ^^^^^^^^^^^
= note: expected `Type<'static>`
found `Type<'_>`