]> git.lizzy.rs Git - rust.git/blob - tests/ui/lub-glb/empty-binders-err.stderr
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / lub-glb / empty-binders-err.stderr
1 error: lifetime may not live long enough
2   --> $DIR/empty-binders-err.rs:20:12
3    |
4 LL | fn covariance<'a, 'b, 'upper>(v: bool)
5    |               --      ------ lifetime `'upper` defined here
6    |               |
7    |               lifetime `'a` defined here
8 ...
9 LL |     let _: &'upper () = match v {
10    |            ^^^^^^^^^^ type annotation requires that `'a` must outlive `'upper`
11    |
12    = help: consider adding the following bound: `'a: 'upper`
13
14 error: lifetime may not live long enough
15   --> $DIR/empty-binders-err.rs:20:12
16    |
17 LL | fn covariance<'a, 'b, 'upper>(v: bool)
18    |                   --  ------ lifetime `'upper` defined here
19    |                   |
20    |                   lifetime `'b` defined here
21 ...
22 LL |     let _: &'upper () = match v {
23    |            ^^^^^^^^^^ type annotation requires that `'b` must outlive `'upper`
24    |
25    = help: consider adding the following bound: `'b: 'upper`
26
27 help: the following changes may resolve your lifetime errors
28    |
29    = help: add bound `'a: 'upper`
30    = help: add bound `'b: 'upper`
31
32 error: lifetime may not live long enough
33   --> $DIR/empty-binders-err.rs:35:12
34    |
35 LL | fn contra_fn<'a, 'b, 'lower>(v: bool)
36    |              --      ------ lifetime `'lower` defined here
37    |              |
38    |              lifetime `'a` defined here
39 ...
40 LL |     let _: fn(&'lower ()) = match v {
41    |            ^^^^^^^^^^^^^^ type annotation requires that `'lower` must outlive `'a`
42    |
43    = help: consider adding the following bound: `'lower: 'a`
44
45 error: lifetime may not live long enough
46   --> $DIR/empty-binders-err.rs:48:12
47    |
48 LL | fn contra_struct<'a, 'b, 'lower>(v: bool)
49    |                  --      ------ lifetime `'lower` defined here
50    |                  |
51    |                  lifetime `'a` defined here
52 ...
53 LL |     let _: Contra<'lower> = match v {
54    |            ^^^^^^^^^^^^^^ type annotation requires that `'lower` must outlive `'a`
55    |
56    = help: consider adding the following bound: `'lower: 'a`
57
58 error: aborting due to 4 previous errors
59