summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/ty-outlives/projection-one-region-closure.stderr
blob: ebdce7bc1083275b2b96cb1a1a6e3aa10bd20c02 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
note: external requirements
  --> $DIR/projection-one-region-closure.rs:45:29
   |
LL |     with_signature(cell, t, |cell, t| require(cell, t));
   |                             ^^^^^^^^^
   |
   = note: defining type: no_relationships_late::<'?1, T>::{closure#0} with closure args [
               i32,
               extern "rust-call" fn((std::cell::Cell<&'?2 ()>, T)),
               (),
           ]
   = note: late-bound region is '?3
   = note: number of external vids: 4
   = note: where T: '?2
   = note: where '?1: '?2

note: no external requirements
  --> $DIR/projection-one-region-closure.rs:41:1
   |
LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | |     T: Anything<'b>,
   | |____________________^
   |
   = note: defining type: no_relationships_late::<'?1, T>

error[E0309]: the parameter type `T` may not live long enough
  --> $DIR/projection-one-region-closure.rs:45:39
   |
LL |     with_signature(cell, t, |cell, t| require(cell, t));
   |                                       ^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound...
   |
LL |     T: Anything<'b> + 'a,
   |                     ++++

error: lifetime may not live long enough
  --> $DIR/projection-one-region-closure.rs:45:39
   |
LL | fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
   |                          --  -- lifetime `'b` defined here
   |                          |
   |                          lifetime `'a` defined here
...
LL |     with_signature(cell, t, |cell, t| require(cell, t));
   |                                       ^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`
   |
   = help: consider adding the following bound: `'b: 'a`

note: external requirements
  --> $DIR/projection-one-region-closure.rs:56:29
   |
LL |     with_signature(cell, t, |cell, t| require(cell, t));
   |                             ^^^^^^^^^
   |
   = note: defining type: no_relationships_early::<'?1, '?2, T>::{closure#0} with closure args [
               i32,
               extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
               (),
           ]
   = note: number of external vids: 4
   = note: where T: '?3
   = note: where '?2: '?3

note: no external requirements
  --> $DIR/projection-one-region-closure.rs:51:1
   |
LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | |     T: Anything<'b>,
LL | |     'a: 'a,
   | |___________^
   |
   = note: defining type: no_relationships_early::<'?1, '?2, T>

error[E0309]: the parameter type `T` may not live long enough
  --> $DIR/projection-one-region-closure.rs:56:39
   |
LL |     with_signature(cell, t, |cell, t| require(cell, t));
   |                                       ^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound...
   |
LL |     T: Anything<'b> + 'a,
   |                     ++++

error: lifetime may not live long enough
  --> $DIR/projection-one-region-closure.rs:56:39
   |
LL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
   |                           --  -- lifetime `'b` defined here
   |                           |
   |                           lifetime `'a` defined here
...
LL |     with_signature(cell, t, |cell, t| require(cell, t));
   |                                       ^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`
   |
   = help: consider adding the following bound: `'b: 'a`

note: external requirements
  --> $DIR/projection-one-region-closure.rs:70:29
   |
LL |     with_signature(cell, t, |cell, t| require(cell, t));
   |                             ^^^^^^^^^
   |
   = note: defining type: projection_outlives::<'?1, '?2, T>::{closure#0} with closure args [
               i32,
               extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
               (),
           ]
   = note: number of external vids: 4
   = note: where <T as Anything<'?2>>::AssocType: '?3

note: no external requirements
  --> $DIR/projection-one-region-closure.rs:62:1
   |
LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | |     T: Anything<'b>,
LL | |     T::AssocType: 'a,
   | |_____________________^
   |
   = note: defining type: projection_outlives::<'?1, '?2, T>

note: external requirements
  --> $DIR/projection-one-region-closure.rs:80:29
   |
LL |     with_signature(cell, t, |cell, t| require(cell, t));
   |                             ^^^^^^^^^
   |
   = note: defining type: elements_outlive::<'?1, '?2, T>::{closure#0} with closure args [
               i32,
               extern "rust-call" fn((std::cell::Cell<&'?3 ()>, T)),
               (),
           ]
   = note: number of external vids: 4
   = note: where T: '?3
   = note: where '?2: '?3

note: no external requirements
  --> $DIR/projection-one-region-closure.rs:74:1
   |
LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where
LL | |     T: Anything<'b>,
LL | |     T: 'a,
LL | |     'b: 'a,
   | |___________^
   |
   = note: defining type: elements_outlive::<'?1, '?2, T>

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0309`.