]> git.lizzy.rs Git - rust.git/blob - tests/ui/regions/regions-close-over-type-parameter-multiple.stderr
internally change regions to be covariant
[rust.git] / tests / ui / regions / regions-close-over-type-parameter-multiple.stderr
1 error: lifetime may not live long enough
2   --> $DIR/regions-close-over-type-parameter-multiple.rs:19:5
3    |
4 LL | fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box<dyn SomeTrait + 'c> {
5    |                    --    -- lifetime `'c` defined here
6    |                    |
7    |                    lifetime `'a` defined here
8 LL |     // A outlives 'a AND 'b...but not 'c.
9 LL |     Box::new(v) as Box<dyn SomeTrait + 'a>
10    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function was supposed to return data with lifetime `'c` but it is returning data with lifetime `'a`
11    |
12    = help: consider adding the following bound: `'a: 'c`
13
14 error: aborting due to previous error
15