summaryrefslogtreecommitdiffstats
path: root/tests/ui/lub-glb/empty-binders-err.stderr
blob: f86f22d5e40bf87a49b1c7b7bc0d6aef6dc74ffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
error: lifetime may not live long enough
  --> $DIR/empty-binders-err.rs:20:12
   |
LL | fn covariance<'a, 'b, 'upper>(v: bool)
   |               --      ------ lifetime `'upper` defined here
   |               |
   |               lifetime `'a` defined here
...
LL |     let _: &'upper () = match v {
   |            ^^^^^^^^^^ type annotation requires that `'a` must outlive `'upper`
   |
   = help: consider adding the following bound: `'a: 'upper`

error: lifetime may not live long enough
  --> $DIR/empty-binders-err.rs:20:12
   |
LL | fn covariance<'a, 'b, 'upper>(v: bool)
   |                   --  ------ lifetime `'upper` defined here
   |                   |
   |                   lifetime `'b` defined here
...
LL |     let _: &'upper () = match v {
   |            ^^^^^^^^^^ type annotation requires that `'b` must outlive `'upper`
   |
   = help: consider adding the following bound: `'b: 'upper`

help: the following changes may resolve your lifetime errors
   |
   = help: add bound `'a: 'upper`
   = help: add bound `'b: 'upper`

error: lifetime may not live long enough
  --> $DIR/empty-binders-err.rs:35:12
   |
LL | fn contra_fn<'a, 'b, 'lower>(v: bool)
   |              --      ------ lifetime `'lower` defined here
   |              |
   |              lifetime `'a` defined here
...
LL |     let _: fn(&'lower ()) = match v {
   |            ^^^^^^^^^^^^^^ type annotation requires that `'lower` must outlive `'a`
   |
   = help: consider adding the following bound: `'lower: 'a`

error: lifetime may not live long enough
  --> $DIR/empty-binders-err.rs:48:12
   |
LL | fn contra_struct<'a, 'b, 'lower>(v: bool)
   |                  --      ------ lifetime `'lower` defined here
   |                  |
   |                  lifetime `'a` defined here
...
LL |     let _: Contra<'lower> = match v {
   |            ^^^^^^^^^^^^^^ type annotation requires that `'lower` must outlive `'a`
   |
   = help: consider adding the following bound: `'lower: 'a`

error: aborting due to 4 previous errors