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