Esteban Küber
a49d4d7713
Special case detecting 'static lifetime requirement coming from -> Box<dyn Trait>
...
```
error[E0310]: the parameter type `R` may not live long enough
--> $DIR/implicit-static-lifetime-in-dyn-trait-return-type.rs:10:5
|
LL | fn bb<R>(r: R) -> Box<dyn Foo> {
| ------- this `dyn Trait` has an implicit `'static` lifetime bound
LL | Box::new(Bar(r))
| ^^^^^^^^^^^^^^^^
| |
| the parameter type `R` must be valid for the static lifetime...
| ...so that the type `R` will meet its required lifetime bounds
|
help: consider adding an explicit lifetime bound
|
LL | fn bb<R: 'static>(r: R) -> Box<dyn Foo> {
| +++++++++
```
2025-11-04 22:33:13 +00:00
..
2025-06-25 17:02:26 +00:00
2025-05-09 02:35:18 +00:00
2025-08-07 21:18:00 +00:00
2025-10-31 20:38:31 +00:00
2025-10-31 20:44:01 +00:00
2025-11-04 22:33:13 +00:00
2025-10-31 20:38:31 +00:00
2025-10-13 15:26:22 +01:00
2025-09-26 16:33:15 +02:00
2025-10-31 20:38:31 +00:00
2025-09-28 20:55:35 +00:00
2025-04-03 11:13:10 +02:00
2025-08-22 20:10:27 +00:00
2025-10-12 08:24:39 +09:00
2025-08-25 14:20:18 +02:00
2025-07-07 16:47:15 +08:00
2025-08-25 14:20:18 +02:00
2025-07-07 16:47:15 +08:00
2025-06-30 11:50:19 +05:00
2025-09-26 16:33:15 +02:00
2025-09-26 16:33:15 +02:00
2025-09-26 16:33:15 +02:00
2025-09-26 16:33:15 +02:00
2025-09-26 16:33:15 +02:00
2025-09-26 16:33:15 +02:00
2025-09-26 16:33:15 +02:00
2025-09-26 16:33:15 +02:00
2025-09-26 16:33:15 +02:00
2025-08-26 15:15:17 -06:00
2025-08-20 11:04:38 +02:00
2025-05-27 08:18:11 +00:00
2025-05-27 08:18:11 +00:00
2025-06-25 17:02:26 +00:00
2025-06-25 17:02:26 +00:00
2025-06-25 17:02:26 +00:00
2025-04-30 10:44:24 +03:00
2025-04-30 10:44:24 +03:00
2025-04-30 10:44:24 +03:00
2025-10-31 20:44:01 +00:00
2025-08-19 21:27:10 +02:00
2025-06-14 13:44:43 +08:00
2025-06-14 13:44:43 +08:00
2025-06-14 13:44:43 +08:00
2025-08-19 21:27:10 +02:00
2025-06-25 17:02:26 +00:00
2025-06-25 17:02:26 +00:00
2025-06-25 17:02:26 +00:00
2025-10-07 09:51:16 +01:00
2025-10-07 09:51:16 +01:00
2025-04-11 11:03:08 +10:00
2025-06-09 17:02:09 +00:00
2025-06-09 17:02:09 +00:00
2025-06-25 17:02:26 +00:00
2025-06-25 17:02:26 +00:00
2025-06-25 17:02:26 +00:00
2025-06-04 10:40:04 -04:00
2025-06-04 10:40:04 -04:00
2025-06-25 17:02:26 +00:00
2025-06-25 17:02:26 +00:00
2025-06-25 17:02:26 +00:00
2025-04-07 19:13:31 +03:00
2025-08-26 15:15:17 -06:00
2025-04-15 10:08:49 +02:00
2025-04-15 10:08:49 +02:00
2025-04-08 23:06:31 +03:00
2025-06-03 15:16:51 +00:00
2025-10-07 23:02:23 +01:00
2025-06-09 19:55:00 +00:00
2025-06-25 15:42:11 +00:00
2025-06-25 15:42:11 +00:00
2025-04-08 23:06:31 +03:00
2025-10-31 20:44:01 +00:00
2025-10-13 15:26:22 +01:00
2025-10-31 20:38:31 +00:00
2025-08-20 11:04:38 +02:00
2025-04-30 10:44:24 +03:00
2025-07-17 19:26:39 +08:00
2025-06-26 13:46:45 +00:00
2025-07-08 14:36:43 +00:00
2025-07-18 12:13:30 +02:00
2025-07-18 12:13:30 +02:00
2025-09-26 16:33:15 +02:00
2025-09-26 16:33:15 +02:00
2025-04-03 11:13:10 +02:00
2025-05-20 10:08:56 +00:00
2025-08-25 14:20:18 +02:00
2025-09-08 14:17:56 +02:00
2025-08-25 14:20:18 +02:00
2025-06-03 15:16:51 +00:00
2025-10-31 20:44:01 +00:00
2025-07-14 09:52:58 -04:00
2025-08-23 22:11:43 +00:00
2025-06-25 15:42:11 +00:00
2025-04-03 11:13:10 +02:00
2025-09-18 12:58:39 +02:00
2025-09-18 12:58:39 +02:00
2025-08-19 21:27:10 +02:00
2025-10-31 20:44:01 +00:00
2025-04-08 23:06:31 +03:00
2025-08-20 11:10:38 +02:00
2025-08-06 01:26:26 +02:00
2025-09-21 17:26:39 -04:00