1 error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements
2 --> $DIR/region-object-lifetime-4.rs:22:7
4 LL | x.borrowed() //~ ERROR cannot infer
7 note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 21:41...
8 --> $DIR/region-object-lifetime-4.rs:21:41
10 LL | fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (Foo+'b)) -> &'b () {
12 note: ...so that reference does not outlive borrowed content
13 --> $DIR/region-object-lifetime-4.rs:22:5
15 LL | x.borrowed() //~ ERROR cannot infer
17 note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 21:44...
18 --> $DIR/region-object-lifetime-4.rs:21:44
20 LL | fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (Foo+'b)) -> &'b () {
22 note: ...so that reference does not outlive borrowed content
23 --> $DIR/region-object-lifetime-4.rs:22:5
25 LL | x.borrowed() //~ ERROR cannot infer
28 error: aborting due to previous error
30 For more information about this error, try `rustc --explain E0495`.