@@ -28,7 +28,7 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
2828 --> $DIR/must_outlive_least_region_or_bound.rs:9:46
2929 |
3030LL | fn elided2(x: &i32) -> impl Copy + 'static { x }
31- | ---- ^ ...is captured here...
31+ | ---- ^ ...is used here...
3232 | |
3333 | this data with an anonymous lifetime `'_`...
3434 |
@@ -50,7 +50,7 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
5050 --> $DIR/must_outlive_least_region_or_bound.rs:11:55
5151 |
5252LL | fn explicit2<'a>(x: &'a i32) -> impl Copy + 'static { x }
53- | ------- ^ ...is captured here...
53+ | ------- ^ ...is used here...
5454 | |
5555 | this data with lifetime `'a`...
5656 |
@@ -80,7 +80,7 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
8080 --> $DIR/must_outlive_least_region_or_bound.rs:24:65
8181 |
8282LL | 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
8484 |
8585help: to declare that the trait object captures data from argument `x`, you can add an explicit `'_` lifetime bound
8686 |
@@ -95,7 +95,7 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
9595 --> $DIR/must_outlive_least_region_or_bound.rs:29:69
9696 |
9797LL | 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...
9999 |
100100note: ...and is required to live as long as `'static` here
101101 --> $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
136136 --> $DIR/must_outlive_least_region_or_bound.rs:16:50
137137 |
138138LL | 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
140140 | |
141141 | this data with an anonymous lifetime `'_`...
142142 |
143143note: `'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
145145 |
146146LL | fn elided3(x: &i32) -> Box<dyn Debug> { Box::new(x) }
147147 | ^^^^^^^^^ ----------- because of this returned expression
@@ -156,12 +156,12 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
156156 --> $DIR/must_outlive_least_region_or_bound.rs:18:59
157157 |
158158LL | 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
160160 | |
161161 | this data with lifetime `'a`...
162162 |
163163note: `'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
165165 |
166166LL | fn explicit3<'a>(x: &'a i32) -> Box<dyn Debug> { Box::new(x) }
167167 | ^^^^^^^^^ ----------- because of this returned expression
@@ -176,12 +176,12 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
176176 --> $DIR/must_outlive_least_region_or_bound.rs:20:60
177177 |
178178LL | 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
180180 | |
181181 | this data with an anonymous lifetime `'_`...
182182 |
183183note: `'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
185185 |
186186LL | fn elided4(x: &i32) -> Box<dyn Debug + 'static> { Box::new(x) }
187187 | ^^^^^^^ ----------- because of this returned expression
@@ -200,10 +200,10 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
200200 --> $DIR/must_outlive_least_region_or_bound.rs:22:69
201201 |
202202LL | 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
204204 |
205205note: `'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
207207 |
208208LL | fn explicit4<'a>(x: &'a i32) -> Box<dyn Debug + 'static> { Box::new(x) }
209209 | ^^^^^^^ ----------- because of this returned expression
0 commit comments