rust/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
482 B
Plaintext
Raw Normal View History

2018-12-11 15:49:40 -06:00
error: lifetime may not live long enough
2018-12-25 09:56:47 -06:00
--> $DIR/region-lbr1-does-not-outlive-ebr2.rs:9:5
|
2018-02-22 18:42:32 -06:00
LL | fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 {
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
2018-02-22 18:42:32 -06:00
LL | &*x
2018-08-07 15:48:50 -05:00
| ^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
2018-11-28 15:05:36 -06:00
|
2019-10-27 09:39:14 -05:00
= help: consider adding the following bound: `'a: 'b`
2018-11-28 15:05:36 -06:00
error: aborting due to previous error