blob: 5ea98dcd4a972a194e603ec6067d98dfb659b873 [file] [log] [blame]
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
--> $DIR/project-fn-ret-contravariant.rs:38:8
|
LL | bar(foo, x)
| ^^^
|
note: first, the lifetime cannot outlive the lifetime `'a` as defined on the function body at 37:8...
--> $DIR/project-fn-ret-contravariant.rs:37:8
|
LL | fn baz<'a,'b>(x: &'a u32) -> &'static u32 {
| ^^
note: ...so that reference does not outlive borrowed content
--> $DIR/project-fn-ret-contravariant.rs:38:13
|
LL | bar(foo, x)
| ^
= note: but, the lifetime must be valid for the static lifetime...
note: ...so that reference does not outlive borrowed content
--> $DIR/project-fn-ret-contravariant.rs:38:4
|
LL | bar(foo, x)
| ^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0495`.