blob: e737d27d5606f67f8c769899328334bae85f41bb [file] [log] [blame]
error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements
--> $DIR/region-object-lifetime-4.rs:12:7
|
LL | x.borrowed()
| ^^^^^^^^
|
note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 11:41...
--> $DIR/region-object-lifetime-4.rs:11:41
|
LL | fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (dyn Foo + 'b)) -> &'b () {
| ^^
note: ...so that reference does not outlive borrowed content
--> $DIR/region-object-lifetime-4.rs:12:5
|
LL | x.borrowed()
| ^
note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 11:44...
--> $DIR/region-object-lifetime-4.rs:11:44
|
LL | fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (dyn Foo + 'b)) -> &'b () {
| ^^
note: ...so that reference does not outlive borrowed content
--> $DIR/region-object-lifetime-4.rs:12:5
|
LL | x.borrowed()
| ^^^^^^^^^^^^
error: aborting due to previous error