1
- error[E0758 ]: cannot infer an appropriate lifetime
1
+ error[E0759 ]: cannot infer an appropriate lifetime
2
2
--> $DIR/must_outlive_least_region_or_bound.rs:3:35
3
3
|
4
4
LL | fn elided(x: &i32) -> impl Copy { x }
@@ -16,7 +16,7 @@ help: to declare that the `impl Trait` captures data from argument `x`, you can
16
16
LL | fn elided(x: &i32) -> impl Copy + '_ { x }
17
17
| ^^^^
18
18
19
- error[E0758 ]: cannot infer an appropriate lifetime
19
+ error[E0759 ]: cannot infer an appropriate lifetime
20
20
--> $DIR/must_outlive_least_region_or_bound.rs:6:44
21
21
|
22
22
LL | fn explicit<'a>(x: &'a i32) -> impl Copy { x }
@@ -34,7 +34,7 @@ help: to declare that the `impl Trait` captures data from argument `x`, you can
34
34
LL | fn explicit<'a>(x: &'a i32) -> impl Copy + 'a { x }
35
35
| ^^^^
36
36
37
- error[E0758 ]: cannot infer an appropriate lifetime
37
+ error[E0759 ]: cannot infer an appropriate lifetime
38
38
--> $DIR/must_outlive_least_region_or_bound.rs:9:46
39
39
|
40
40
LL | fn elided2(x: &i32) -> impl Copy + 'static { x }
@@ -56,7 +56,7 @@ help: alternatively, add an explicit `'static` bound to this reference
56
56
LL | fn elided2(x: &'static i32) -> impl Copy + 'static { x }
57
57
| ^^^^^^^^^^^^
58
58
59
- error[E0758 ]: cannot infer an appropriate lifetime
59
+ error[E0759 ]: cannot infer an appropriate lifetime
60
60
--> $DIR/must_outlive_least_region_or_bound.rs:12:55
61
61
|
62
62
LL | fn explicit2<'a>(x: &'a i32) -> impl Copy + 'static { x }
@@ -86,7 +86,7 @@ LL | fn foo<'a>(x: &i32) -> impl Copy + 'a { x }
86
86
| |
87
87
| help: add explicit lifetime `'a` to the type of `x`: `&'a i32`
88
88
89
- error[E0758 ]: cannot infer an appropriate lifetime
89
+ error[E0759 ]: cannot infer an appropriate lifetime
90
90
--> $DIR/must_outlive_least_region_or_bound.rs:33:69
91
91
|
92
92
LL | fn with_bound<'a>(x: &'a i32) -> impl LifetimeTrait<'a> + 'static { x }
@@ -123,7 +123,7 @@ LL | fn ty_param_wont_outlive_static<T:Debug>(x: T) -> impl Debug + 'static {
123
123
| |
124
124
| help: consider adding an explicit lifetime bound...: `T: 'static +`
125
125
126
- error[E0758 ]: cannot infer an appropriate lifetime
126
+ error[E0759 ]: cannot infer an appropriate lifetime
127
127
--> $DIR/must_outlive_least_region_or_bound.rs:18:50
128
128
|
129
129
LL | fn elided3(x: &i32) -> Box<dyn Debug> { Box::new(x) }
@@ -136,7 +136,7 @@ help: to declare that the trait object captures data from argument `x`, you can
136
136
LL | fn elided3(x: &i32) -> Box<dyn Debug + '_> { Box::new(x) }
137
137
| ^^^^
138
138
139
- error[E0758 ]: cannot infer an appropriate lifetime
139
+ error[E0759 ]: cannot infer an appropriate lifetime
140
140
--> $DIR/must_outlive_least_region_or_bound.rs:21:59
141
141
|
142
142
LL | fn explicit3<'a>(x: &'a i32) -> Box<dyn Debug> { Box::new(x) }
@@ -149,7 +149,7 @@ help: to declare that the trait object captures data from argument `x`, you can
149
149
LL | fn explicit3<'a>(x: &'a i32) -> Box<dyn Debug + 'a> { Box::new(x) }
150
150
| ^^^^
151
151
152
- error[E0758 ]: cannot infer an appropriate lifetime
152
+ error[E0759 ]: cannot infer an appropriate lifetime
153
153
--> $DIR/must_outlive_least_region_or_bound.rs:24:60
154
154
|
155
155
LL | fn elided4(x: &i32) -> Box<dyn Debug + 'static> { Box::new(x) }
@@ -166,7 +166,7 @@ help: alternatively, add an explicit `'static` bound to this reference
166
166
LL | fn elided4(x: &'static i32) -> Box<dyn Debug + 'static> { Box::new(x) }
167
167
| ^^^^^^^^^^^^
168
168
169
- error[E0758 ]: cannot infer an appropriate lifetime
169
+ error[E0759 ]: cannot infer an appropriate lifetime
170
170
--> $DIR/must_outlive_least_region_or_bound.rs:27:69
171
171
|
172
172
LL | fn explicit4<'a>(x: &'a i32) -> Box<dyn Debug + 'static> { Box::new(x) }
@@ -183,5 +183,5 @@ LL | fn explicit4<'a>(x: &'static i32) -> Box<dyn Debug + 'static> { Box::new(x)
183
183
184
184
error: aborting due to 12 previous errors
185
185
186
- Some errors have detailed explanations: E0310, E0621, E0623, E0758 .
186
+ Some errors have detailed explanations: E0310, E0621, E0623, E0759 .
187
187
For more information about an error, try `rustc --explain E0310`.
0 commit comments