summaryrefslogtreecommitdiffstats
path: root/src/test/ui/regions/regions-free-region-ordering-caller.stderr
blob: c79ed50c6a4a6bc64513b19eab863a4e88e7c142 (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
error: lifetime may not live long enough
  --> $DIR/regions-free-region-ordering-caller.rs:8:12
   |
LL | fn call2<'a, 'b>(a: &'a usize, b: &'b usize) {
   |          --  -- lifetime `'b` defined here
   |          |
   |          lifetime `'a` defined here
LL |     let z: Option<&'b &'a usize> = None;
   |            ^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'b`
   |
   = help: consider adding the following bound: `'a: 'b`

error: lifetime may not live long enough
  --> $DIR/regions-free-region-ordering-caller.rs:14:12
   |
LL | fn call3<'a, 'b>(a: &'a usize, b: &'b usize) {
   |          --  -- lifetime `'b` defined here
   |          |
   |          lifetime `'a` defined here
LL |     let y: Paramd<'a> = Paramd { x: a };
LL |     let z: Option<&'b Paramd<'a>> = None;
   |            ^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'b`
   |
   = help: consider adding the following bound: `'a: 'b`

error: lifetime may not live long enough
  --> $DIR/regions-free-region-ordering-caller.rs:19:12
   |
LL | fn call4<'a, 'b>(a: &'a usize, b: &'b usize) {
   |          --  -- lifetime `'b` defined here
   |          |
   |          lifetime `'a` defined here
LL |     let z: Option<&'a &'b usize> = None;
   |            ^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a`
   |
   = help: consider adding the following bound: `'b: 'a`

error: aborting due to 3 previous errors