rust/src/test/ui/object-lifetime/object-lifetime-default-elision.stderr
Niko Matsakis b2e0215a1f apply process_registered_region_obligations at the end of regionck
We used to apply it repeatedly as we went, relying on the current
value of the `region_bound_pairs_accum` vector. But now we save those
values into a map, so we can just process all the registered region
obligations at the end.
2018-09-26 09:38:26 -04:00

54 lines
1.9 KiB
Plaintext

error[E0495]: cannot infer an appropriate lifetime for automatic coercion due to conflicting requirements
--> $DIR/object-lifetime-default-elision.rs:81:5
|
LL | ss
| ^^
|
note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 64:10...
--> $DIR/object-lifetime-default-elision.rs:64:10
|
LL | fn load3<'a,'b>(ss: &'a SomeTrait) -> &'b SomeTrait {
| ^^
note: ...so that reference does not outlive borrowed content
--> $DIR/object-lifetime-default-elision.rs:81:5
|
LL | ss
| ^^
note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 64:13...
--> $DIR/object-lifetime-default-elision.rs:64:13
|
LL | fn load3<'a,'b>(ss: &'a SomeTrait) -> &'b SomeTrait {
| ^^
= note: ...so that the expression is assignable:
expected &'b (dyn SomeTrait + 'b)
found &dyn SomeTrait
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
--> $DIR/object-lifetime-default-elision.rs:81:5
|
LL | ss
| ^^
|
note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 64:10...
--> $DIR/object-lifetime-default-elision.rs:64:10
|
LL | fn load3<'a,'b>(ss: &'a SomeTrait) -> &'b SomeTrait {
| ^^
note: ...so that the declared lifetime parameter bounds are satisfied
--> $DIR/object-lifetime-default-elision.rs:81:5
|
LL | ss
| ^^
note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 64:13...
--> $DIR/object-lifetime-default-elision.rs:64:13
|
LL | fn load3<'a,'b>(ss: &'a SomeTrait) -> &'b SomeTrait {
| ^^
= note: ...so that the expression is assignable:
expected &'b (dyn SomeTrait + 'b)
found &dyn SomeTrait
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0495`.