]> git.lizzy.rs Git - rust.git/blob - src/test/ui/variance/variance-use-covariant-struct-1.nll.stderr
Merge commit '40b00f4200fbdeefd11815398cb46394b8cb0a5e' into sync_cg_clif-2021-12-30
[rust.git] / src / test / ui / variance / variance-use-covariant-struct-1.nll.stderr
1 error: lifetime may not live long enough
2   --> $DIR/variance-use-covariant-struct-1.rs:10:5
3    |
4 LL | fn foo<'min,'max>(v: SomeStruct<&'min ()>)
5    |        ---- ---- lifetime `'max` defined here
6    |        |
7    |        lifetime `'min` defined here
8 ...
9 LL |     v
10    |     ^ returning this value requires that `'min` must outlive `'max`
11    |
12    = help: consider adding the following bound: `'min: 'max`
13
14 error: aborting due to previous error
15