]> git.lizzy.rs Git - rust.git/blob - src/test/ui/variance/variance-invariant-arg-trait-match.nll.stderr
More nll revisions
[rust.git] / src / test / ui / variance / variance-invariant-arg-trait-match.nll.stderr
1 error: lifetime may not live long enough
2   --> $DIR/variance-invariant-arg-trait-match.rs:14:5
3    |
4 LL | fn get_min_from_max<'min, 'max, G>()
5    |                     ----  ---- lifetime `'max` defined here
6    |                     |
7    |                     lifetime `'min` defined here
8 ...
9 LL |     impls_get::<G,&'min i32>()
10    |     ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max`
11    |
12    = help: consider adding the following bound: `'min: 'max`
13
14 error: lifetime may not live long enough
15   --> $DIR/variance-invariant-arg-trait-match.rs:22:5
16    |
17 LL | fn get_max_from_min<'min, 'max, G>()
18    |                     ----  ---- lifetime `'max` defined here
19    |                     |
20    |                     lifetime `'min` defined here
21 ...
22 LL |     impls_get::<G,&'max i32>()
23    |     ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max`
24    |
25    = help: consider adding the following bound: `'min: 'max`
26
27 error: aborting due to 2 previous errors
28