@@ -28,7 +28,7 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
28
28
--> $DIR/must_outlive_least_region_or_bound.rs:9:46
29
29
|
30
30
LL | fn elided2(x: &i32) -> impl Copy + 'static { x }
31
- | ---- ^ ...is captured here...
31
+ | ---- ^ ...is used here...
32
32
| |
33
33
| this data with an anonymous lifetime `'_`...
34
34
|
@@ -50,7 +50,7 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
50
50
--> $DIR/must_outlive_least_region_or_bound.rs:11:55
51
51
|
52
52
LL | fn explicit2<'a>(x: &'a i32) -> impl Copy + 'static { x }
53
- | ------- ^ ...is captured here...
53
+ | ------- ^ ...is used here...
54
54
| |
55
55
| this data with lifetime `'a`...
56
56
|
@@ -80,7 +80,7 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
80
80
--> $DIR/must_outlive_least_region_or_bound.rs:24:65
81
81
|
82
82
LL | fn elided5(x: &i32) -> (Box<dyn Debug>, impl Debug) { (Box::new(x), x) }
83
- | ---- this data with an anonymous lifetime `'_`... ^ ...is captured and required to live as long as `'static` here
83
+ | ---- this data with an anonymous lifetime `'_`... ^ ...is used and required to live as long as `'static` here
84
84
|
85
85
help: to declare that the trait object captures data from argument `x`, you can add an explicit `'_` lifetime bound
86
86
|
@@ -95,7 +95,7 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
95
95
--> $DIR/must_outlive_least_region_or_bound.rs:29:69
96
96
|
97
97
LL | fn with_bound<'a>(x: &'a i32) -> impl LifetimeTrait<'a> + 'static { x }
98
- | ------- this data with lifetime `'a`... ^ ...is captured here...
98
+ | ------- this data with lifetime `'a`... ^ ...is used here...
99
99
|
100
100
note: ...and is required to live as long as `'static` here
101
101
--> $DIR/must_outlive_least_region_or_bound.rs:29:34
@@ -136,12 +136,12 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
136
136
--> $DIR/must_outlive_least_region_or_bound.rs:16:50
137
137
|
138
138
LL | fn elided3(x: &i32) -> Box<dyn Debug> { Box::new(x) }
139
- | ---- ^ ...is captured and required to live as long as `'static` here
139
+ | ---- ^ ...is used and required to live as long as `'static` here
140
140
| |
141
141
| this data with an anonymous lifetime `'_`...
142
142
|
143
143
note: `'static` lifetime requirement introduced by the return type
144
- --> $DIR/must_outlive_least_region_or_bound.rs:14 :28
144
+ --> $DIR/must_outlive_least_region_or_bound.rs:16 :28
145
145
|
146
146
LL | fn elided3(x: &i32) -> Box<dyn Debug> { Box::new(x) }
147
147
| ^^^^^^^^^ ----------- because of this returned expression
@@ -156,12 +156,12 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
156
156
--> $DIR/must_outlive_least_region_or_bound.rs:18:59
157
157
|
158
158
LL | fn explicit3<'a>(x: &'a i32) -> Box<dyn Debug> { Box::new(x) }
159
- | ------- ^ ...is captured and required to live as long as `'static` here
159
+ | ------- ^ ...is used and required to live as long as `'static` here
160
160
| |
161
161
| this data with lifetime `'a`...
162
162
|
163
163
note: `'static` lifetime requirement introduced by the return type
164
- --> $DIR/must_outlive_least_region_or_bound.rs:16 :37
164
+ --> $DIR/must_outlive_least_region_or_bound.rs:18 :37
165
165
|
166
166
LL | fn explicit3<'a>(x: &'a i32) -> Box<dyn Debug> { Box::new(x) }
167
167
| ^^^^^^^^^ ----------- because of this returned expression
@@ -176,12 +176,12 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
176
176
--> $DIR/must_outlive_least_region_or_bound.rs:20:60
177
177
|
178
178
LL | fn elided4(x: &i32) -> Box<dyn Debug + 'static> { Box::new(x) }
179
- | ---- ^ ...is captured and required to live as long as `'static` here
179
+ | ---- ^ ...is used and required to live as long as `'static` here
180
180
| |
181
181
| this data with an anonymous lifetime `'_`...
182
182
|
183
183
note: `'static` lifetime requirement introduced by the return type
184
- --> $DIR/must_outlive_least_region_or_bound.rs:18 :40
184
+ --> $DIR/must_outlive_least_region_or_bound.rs:20 :40
185
185
|
186
186
LL | fn elided4(x: &i32) -> Box<dyn Debug + 'static> { Box::new(x) }
187
187
| ^^^^^^^ ----------- because of this returned expression
@@ -200,10 +200,10 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
200
200
--> $DIR/must_outlive_least_region_or_bound.rs:22:69
201
201
|
202
202
LL | fn explicit4<'a>(x: &'a i32) -> Box<dyn Debug + 'static> { Box::new(x) }
203
- | ------- this data with lifetime `'a`... ^ ...is captured and required to live as long as `'static` here
203
+ | ------- this data with lifetime `'a`... ^ ...is used and required to live as long as `'static` here
204
204
|
205
205
note: `'static` lifetime requirement introduced by the return type
206
- --> $DIR/must_outlive_least_region_or_bound.rs:20 :49
206
+ --> $DIR/must_outlive_least_region_or_bound.rs:22 :49
207
207
|
208
208
LL | fn explicit4<'a>(x: &'a i32) -> Box<dyn Debug + 'static> { Box::new(x) }
209
209
| ^^^^^^^ ----------- because of this returned expression
0 commit comments