]> git.lizzy.rs Git - rust.git/blob - src/test/ui/variance/variance-use-contravariant-struct-1.nll.stderr
Sync rust-lang/portable-simd@5f49d4c8435a25d804b2f375e949cb25479f5be9
[rust.git] / src / test / ui / variance / variance-use-contravariant-struct-1.nll.stderr
1 error: lifetime may not live long enough
2   --> $DIR/variance-use-contravariant-struct-1.rs:12:5
3    |
4 LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>)
5    |        ---- ---- lifetime `'max` defined here
6    |        |
7    |        lifetime `'min` defined here
8 ...
9 LL |     v
10    |     ^ function was supposed to return data with lifetime `'max` but it is returning data with lifetime `'min`
11    |
12    = help: consider adding the following bound: `'min: 'max`
13
14 error: aborting due to previous error
15